public function requireDefaultRecords()
    {
        parent::requireDefaultRecords();
        if (!self::get()->exists() && $this->config()->create_default_pages) {
            $page = self::create()->update(
                [
                    'Title'       => 'Checkout',
                    'URLSegment'  => CheckoutPageController::config()->url_segment,
                    'ShowInMenus' => 0,
                ]
            );
            $page->write();
            $page->publishSingle();
            $page->flushCache();
            DB::alteration_message('Checkout page created', 'created');
        }
    }
public function requireDefaultRecords()
    {
        parent::requireDefaultRecords();
        if (!self::get()->exists() && $this->config()->create_default_pages) {
            $page = self::create()->update(
                [
                    'Title'       => 'Checkout',
                    'URLSegment'  => CheckoutPageController::config()->url_segment,
                    'ShowInMenus' => 0,
                ]
            );
            $page->write();
            $page->publishSingle();
            $page->flushCache();
            DB::alteration_message('Checkout page created', 'created');
        }
    }
public function requireDefaultRecords ( ) { parent :: requireDefaultRecords ( ) ; if ( ! self :: get ( ) -> exists ( ) && $ this -> config ( ) -> create_default_pages ) { $ page = self :: create ( ) -> update ( [ 'Title' => 'Checkout' , 'URLSegment' => CheckoutPageController :: config ( ) -> url_segment , 'ShowInMenus' => 0 , ] ) ; $ page -> write ( ) ; $ page -> publishSingle ( ) ; $ page -> flushCache ( ) ; DB :: alteration_message ( 'Checkout page created' , 'created' ) ; } }
This module always requires a page model.
This module always requires a page model .