Make a new page instance.

@param string $slug
@param string $title

@return PageInterface
173670
public function make(string $slug, string $title): PageInterface
    {
        $view = (new PageView($this->view))
            ->setTheme('themosis.pages')
            ->setLayout('default')
            ->setView('page');

        $page = new Page($this->action, $this->filter, $view, new PageSettingsRepository(), $this->validator);
        $page->setSlug($slug)
            ->setTitle($title)
            ->setMenu($title);

        // Store page instance within the service container.
        $this->view->getContainer()->instance($this->prefix.'.'.$page->getSlug(), $page);

        return $page;
    }
178394
public function create($title, $content, $slug, array $tags, $active, $user_id, DateTime $publish_date)
	{
		$post = Post::create(compact('title', 'content', 'slug', 'active', 'user_id', 'publish_date'));

		$post->tags()->delete();

		$post->tags()->createMany($this->prepareTags($tags));

		return $post;
	}
88278
public function createItem($text, $href, $title = '')
    {
        $breadcrumb = new BreadcrumbObject();

        $breadcrumb->setText($text);
        $breadcrumb->setHref($href);

        if ($title) {
            $breadcrumb->setTitle($title);
        }

        $this->breadcrumbs[] = $breadcrumb;

        return $breadcrumb;
    }
498007
public function make(string $slug, string $plural, string $singular): PostTypeInterface
    {
        $postType = (new PostType($slug, $this->action, $this->filter))
            ->setLabels([
                'name' => $plural,
                'singular_name' => $singular,
                'add_new_item' => sprintf('Add New %s', $singular),
                'edit_item' => sprintf('Edit %s', $singular),
                'new_item' => sprintf('New %s', $singular),
                'view_item' => sprintf('View %s', $singular),
                'view_items' => sprintf('View %s', $plural),
                'search_items' => sprintf('Search %s', $plural),
                'not_found' => sprintf('No %s found', $plural),
                'not_found_in_trash' => sprintf('No %s found in Trash', $plural),
                'parent_item_colon' => sprintf('Parent %s:', $singular),
                'all_items' => sprintf('All %s', $plural),
                'archives' => sprintf('%s Archives', $singular),
                'attributes' => sprintf('%s Attributes', $singular),
                'insert_into_item' => sprintf('Insert into %s', strtolower($singular)),
                'uploaded_to_this_item' => sprintf('Uploaded to this %s', strtolower($singular)),
                'filter_items_list' => sprintf('Filter %s list', strtolower($plural)),
                'items_list_navigation' => sprintf('%s list navigation', $plural),
                'items_list' => sprintf('%s list', $plural)
            ])
            ->setArguments([
                'public' => true,
                'show_in_rest' => true,
                'menu_position' => 20,
                'supports' => ['title'],
                'has_archive' => true
            ]);

        $abstract = sprintf('themosis.posttype.%s', $slug);

        if (! $this->container->bound($abstract)) {
            $this->container->instance($abstract, $postType);
        } else {
            throw new PostTypeException('The post type ['.$slug.'] already exists.');
        }

        return $postType;
    }
536944
public static function create($name, $slug, $locale, $alias, $icon) : self
    {
        $self = new static();
        $self->name    = $name;
        $self->slug    = $slug;
        $self->locale  = $locale;
        $self->alias   = $alias;
        $self->icon    = $icon;
        $self->created_by = Yii::$app->user->identity->id;
        $self->updated_by = Yii::$app->user->identity->id;
        return $self;
    }
594519
def create_page(slug, post_data):
        '''
        
        '''
        logger.info('Call create Page')
        if MWiki.get_by_uid(slug):
            return False

        title = post_data['title'].strip()
        if len(title) < 2:
            return False
        return MWiki.__create_rec(slug, '2', post_data=post_data)
729189
public function actionCreate( $slug ) {

        $post   = $this->modelService->getBySlug( $slug, true );

        $this->view->params[ 'model' ]  = $post;

        $this->view->params[ 'step' ]   = 'content';

        if( isset( $post ) ) {

            $model          = new Block();
            $modelBlock     = new ModelBlock();

            $model->siteId  = Yii::$app->core->site->id;

            if( $model->load( Yii::$app->request->post(), $model->getClassName() ) ) {

                $this->blockService->create( $model );

                $modelBlock->modelId    = $model->id;
                $modelBlock->parentId   = $post->id;
                $modelBlock->parentType = $post->type;

                $this->modelBlockService->create( $modelBlock );

                // Create Gallery
                $gallery            = new Gallery();
                $gallery->name      = $model->name;
                $gallery->siteId    = Yii::$app->core->siteId;
                $modelGallery       = $this->modelGalleryService->create( $gallery, [ 'parentId' => $model->id, 'parentType' => CmsGlobal::TYPE_BLOG_CONTENT ] );

                return $this->redirect( [ "update?slug=$model->slug&pslug=$post->slug" ] );
            }

            return $this->render( 'create', [
                'model' => $model,
                'post' => $post
            ] );
        }

        // Error- Page not found
		throw new NotFoundHttpException( Yii::$app->coreMessage->getMessage( CoreGlobal::ERROR_NOT_FOUND ) );
    }
826538
public function setPageName($title)
    {
        $this->oldTitle = $this->pageName;
        $this->pageName = $title;

        if ($this->pageName && $this->getContentRoute()) {
            $this->getContentRoute()->setName($this->pageName);
        }

        return $this;
    }
875146
public function add(string $title, string $url)
    {
        $this->breadcrumbs->push(new Breadcrumb($title, $url));
    }
606748
public function createNode($type, $title)
    {
        // @todo make this easily extensible.
        $node = (object) array(
        'title' => $title,
        'type' => $type,
        );
        $saved = $this->nodeCreate($node);
        // Set internal page on the new node.
        $this->getSession()->visit($this->locatePath('/node/' . $saved->nid));
    }
567174
protected function setPageTitle($title) {

        $this->pageTitle = $title;

        $args = array('class' => 'title');
        $titleTag = \MUtil_Html::create('h3', $title, $args);

        $this->html->append($titleTag);
    }
1074175
public function main($title)
    {
        $ret = null;

        // ############################
        // Fetch from cache
        // ############################

        $pageTitleCachingEnabled = $this->checkIfPageTitleCachingEnabled();
        if ($pageTitleCachingEnabled === true) {
            $cacheIdentification = sprintf(
                '%s_%s_title',
                $GLOBALS['TSFE']->id,
                substr(sha1(FrontendUtility::getCurrentUrl()), 10, 30)
            );

            /** @var \TYPO3\CMS\Core\Cache\CacheManager $cacheManager */
            $objectManager = Typo3GeneralUtility::makeInstance(
                'TYPO3\\CMS\\Extbase\\Object\\ObjectManager'
            );
            $cacheManager  = $objectManager->get('TYPO3\\CMS\\Core\\Cache\\CacheManager');
            $cache         = $cacheManager->getCache('cache_pagesection');

            $cacheTitle = $cache->get($cacheIdentification);
            if (!empty($cacheTitle)) {
                $ret = $cacheTitle;
            }
        }

        // ############################
        // Generate page title
        // ############################

        // Generate page title if not set
        // also fallback
        if (empty($ret)) {
            $this->initialize();
            $ret = $this->generatePageTitle($title);

            // Cache page title (if page is not cacheable)
            if ($pageTitleCachingEnabled === true && isset($cache) && isset($cacheIdentification)) {
                $cache->set($cacheIdentification, $ret, array('pageId_' . $GLOBALS['TSFE']->id));
            }
        }

        // ############################
        // Output
        // ############################

        // Call hook
        GeneralUtility::callHookAndSignal(__CLASS__, 'pageTitleOutput', $this, $ret);

        return $ret;
    }
842561
public function page($slug, $action)
    {
        $route = $this->addRoute('GET', $slug, $action);
        $route->setWordpressConditional('is_page');

        return $route;
    }
981032
public function show($slug)
    {
        $page = Page::where('slug', $slug)->first();

        if (!$page) {
            abort(404);
        }

        return view('show', ['page' => $page]);
    }
416251
public function title(string $title = null): Htmlable
    {
        $page = Paginator::resolveCurrentPage();

        $data = [
            'site' => ['name' => $this->site],
            'page' => ['title' => $title, 'number' => $page],
        ];

        $data['site']['name'] = $this->getHtmlTitleFormatForSite($data);

        $output = $this->getHtmlTitleFormatForPage($data);

        return $this->html->create('title', trim($output));
    }
953614
public function registerMenuPage($slug, $title, array $permissions, $link = null, $icon = null, $position = null)
    {
        if ($this->menuPageExists($slug)) {
            return false;
        }

        $slug = trim(Str::slug($slug));
        $title = trim($title);
        if ( ! is_array($permissions)) {
            $permissions = (array)$permissions;
        }
        $link = trim($link);
        $position = (null === $position) ? 1500 : (int)$position;


        if ( ! empty($slug) && ! empty($title)) {
            $this->menuLinks[ $slug ] = [
                'title'       => $title,
                'permissions' => $permissions,
                'link'        => $link,
                'icon'        => $icon,
                'position'    => (int)$position,
            ];

            return $slug;
        }

        return false;
    }
404565
public
    function index($slug)
    {

        $page = Model::getBySlug($slug);

        if (!$page)
            return response()->view("Jlib::errors.404")->setStatusCode(404);

        return response()->make($page);


    }