当前位置: 首页>>代码示例>>PHP>>正文


PHP Page::all方法代码示例

本文整理汇总了PHP中Cms\Classes\Page::all方法的典型用法代码示例。如果您正苦于以下问题:PHP Page::all方法的具体用法?PHP Page::all怎么用?PHP Page::all使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Cms\Classes\Page的用法示例。


在下文中一共展示了Page::all方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: scanForMessages

 /**
  * Scans the theme templates for message references.
  * @return void
  */
 public function scanForMessages()
 {
     $messages = [];
     foreach (Layout::all() as $layout) {
         $messages = array_merge($messages, $this->parseContent($layout->markup));
     }
     foreach (Page::all() as $page) {
         $messages = array_merge($messages, $this->parseContent($page->markup));
     }
     foreach (Partial::all() as $partial) {
         $messages = array_merge($messages, $this->parseContent($partial->markup));
     }
     Message::importMessages($messages);
 }
开发者ID:aydancoskun,项目名称:octobercms,代码行数:18,代码来源:ThemeScanner.php

示例2: register

 public function register()
 {
     \Event::listen('backend.form.extendFields', function ($widget) {
         if (!$widget->model instanceof \Cms\Classes\Page) {
             return;
         }
         if (!($theme = Theme::getEditTheme())) {
             throw new ApplicationException(Lang::get('cms::lang.theme.edit.not_found'));
         }
         $pages = Page::all()->sort(function ($a, $b) {
             return strcasecmp($a->title, $b->title);
         });
         $pageOptions = $this->buildPageOptions($pages);
         $widget->addFields(['settings[child_of]' => ['label' => 'Child Of', 'type' => 'dropdown', 'tab' => 'Breadcrumbs', 'span' => 'left', 'options' => $pageOptions, 'comment' => 'The parent of this page. Set to "None" if root page'], 'settings[hide_crumb]' => ['label' => 'Hide Breadcrumbs', 'type' => 'checkbox', 'tab' => 'Breadcrumbs', 'span' => 'right', 'comment' => 'Hide the breadcrumb trail on this page'], 'settings[crumb_title]' => ['label' => 'Crumb Title (Optional)', 'type' => 'text', 'tab' => 'Breadcrumbs', 'span' => 'left', 'comment' => 'Title text for this pages crumb, by default will use page title'], 'settings[remove_crumb_trail]' => ['label' => 'Remove From Breadcrumbs', 'type' => 'checkbox', 'tab' => 'Breadcrumbs', 'span' => 'right', 'comment' => 'Do not show this page in the breadcrumb trail'], 'settings[crumbElementTitle]' => ['label' => 'Crumb Title From Id (Optional)', 'type' => 'text', 'tab' => 'Breadcrumbs', 'span' => 'left', 'comment' => 'Use a DOM element as the crumb title for this page. Must be a a unique #id on the page.'], 'settings[crumb_disabled]' => ['label' => 'Disabled', 'type' => 'checkbox', 'tab' => 'Breadcrumbs', 'span' => 'right', 'comment' => 'Disable the link and add the disabled class to this crumb item in the breadcrumb list']], 'primary');
     });
 }
开发者ID:tysonrude,项目名称:bloom7,代码行数:16,代码来源:Plugin.php

示例3: onRun

 public function onRun()
 {
     $this->pages = $this->page['pages'] = Page::all();
     $this->dependencyString = $this->page['dependencyString'] = $this->getModuleDependencies();
 }
开发者ID:romanov-acc,项目名称:angular-plugin,代码行数:5,代码来源:Layout.php


注:本文中的Cms\Classes\Page::all方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。