當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Classes\Controller類代碼示例

本文整理匯總了PHP中Backend\Classes\Controller的典型用法代碼示例。如果您正苦於以下問題:PHP Controller類的具體用法?PHP Controller怎麽用?PHP Controller使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了Controller類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: boot

 public function boot()
 {
     Event::listen('backend.form.extendFields', function ($form) {
         if ($form->model instanceof Backend\Models\BackendPreferences) {
             $form->addFields(['focus_searchfield' => ['label' => 'indikator.backend::lang.settings.search_label', 'type' => 'switch', 'span' => 'left', 'default' => 'false', 'comment' => 'indikator.backend::lang.settings.search_comment'], 'sidebar_description' => ['label' => 'indikator.backend::lang.settings.sidebar_label', 'type' => 'switch', 'span' => 'right', 'default' => 'false', 'comment' => 'indikator.backend::lang.settings.sidebar_comment'], 'rounded_avatar' => ['label' => 'indikator.backend::lang.settings.avatar_label', 'type' => 'switch', 'span' => 'left', 'default' => 'false', 'comment' => 'indikator.backend::lang.settings.avatar_comment'], 'virtual_keyboard' => ['label' => 'indikator.backend::lang.settings.keyboard_label', 'type' => 'switch', 'span' => 'right', 'default' => 'false', 'comment' => 'indikator.backend::lang.settings.keyboard_comment'], 'media_menu' => ['label' => 'indikator.backend::lang.settings.media_label', 'type' => 'switch', 'span' => 'left', 'default' => 'false', 'comment' => 'indikator.backend::lang.settings.media_comment'], 'more_themes' => ['label' => 'indikator.backend::lang.settings.themes_label', 'type' => 'switch', 'span' => 'right', 'default' => 'false', 'comment' => 'indikator.backend::lang.settings.themes_comment']]);
         }
     });
     BackendController::extend(function ($controller) {
         if (BackendAuth::check()) {
             $preferences = UserPreferences::forUser()->get('backend::backend.preferences');
             if (isset($preferences['focus_searchfield']) && $preferences['focus_searchfield']) {
                 $controller->addJs('/plugins/indikator/backend/assets/js/setting-search.js');
             }
             if (isset($preferences['rounded_avatar']) && $preferences['rounded_avatar']) {
                 $controller->addCss('/plugins/indikator/backend/assets/css/rounded-avatar.css');
             }
             if (isset($preferences['virtual_keyboard']) && $preferences['virtual_keyboard']) {
                 $controller->addCss('/plugins/indikator/backend/assets/css/ml-keyboard.css');
                 $controller->addJs('/plugins/indikator/backend/assets/js/ml-keyboard.js');
             }
             if (isset($preferences['media_menu']) && $preferences['media_menu']) {
                 $controller->addCss('/plugins/indikator/backend/assets/css/media-menu.css');
             }
             if (isset($preferences['more_themes']) && $preferences['more_themes']) {
                 $controller->addJs('/plugins/indikator/backend/assets/js/setting-theme.js');
             }
         }
     });
     BackendMenu::registerContextSidenavPartial('October.System', 'system', '~/plugins/indikator/backend/partials/_system_sidebar.htm');
 }
開發者ID:janusnic,項目名稱:oc-backend-plus,代碼行數:30,代碼來源:Plugin.php

示例2: __construct

 /**
  * Constructor.
  */
 public function __construct()
 {
     parent::__construct();
     BackendMenu::setContext('October.Cms', 'media', true);
     $this->pageTitle = 'cms::lang.media.menu_label';
     $manager = new MediaManager($this, 'manager');
     $manager->bindToController();
 }
開發者ID:GoldBest,項目名稱:october,代碼行數:11,代碼來源:Media.php

示例3: __construct

 public function __construct()
 {
     parent::__construct();
     //        BackendMenu::setContext('CheerfulLab.Frontendspelling', 'frontendspelling', 'spellingrequests');
     BackendMenu::setContext('CheerfulLab.FrontendSpelling', 'spelling', 'requests');
     //        BackendMenu::setContext('RainLab.Blog', 'blog', 'posts');
 }
開發者ID:janusnic,項目名稱:frontSpelling-plugin,代碼行數:7,代碼來源:SpellingRequests.php

示例4: __construct

 /**
  * {@inheritdoc}
  */
 public function __construct()
 {
     parent::__construct();
     BackendMenu::setContext('Adrenth.Redirect', 'redirect', $this->action);
     $this->requiredPermissions = ['adrenth.redirect.access_redirects'];
     $this->vars['match'] = null;
 }
開發者ID:adrenth,項目名稱:redirect,代碼行數:10,代碼來源:Redirects.php

示例5: __construct

 /**
  * Constructor
  */
 public function __construct()
 {
     parent::__construct();
     $this->addJs('/plugins/renatio/backupmanager/assets/js/backup.js');
     BackendMenu::setContext('Renatio.BackupManager', 'backupmanager', 'backups');
     SettingsManager::setContext('Renatio.BackupManager', 'settings');
 }
開發者ID:arall,項目名稱:recetarium,代碼行數:10,代碼來源:Backups.php

示例6: __construct

 public function __construct()
 {
     parent::__construct();
     BackendMenu::setContext('Feegleweb.OctoshopLite', 'shop', 'products');
     $this->addCss($this->assetsPath . '/css/modal-form.css');
     $this->addJs($this->assetsPath . '/js/product-form.js');
 }
開發者ID:Hasnayeen,項目名稱:shohoranno,代碼行數:7,代碼來源:Products.php

示例7: __construct

 public function __construct()
 {
     parent::__construct();
     BackendMenu::setContext('October.System', 'system', 'settings');
     SettingsManager::setContext('Responsiv.Pay', 'types');
     GatewayManager::createPartials();
 }
開發者ID:dogiedog,項目名稱:pay-plugin,代碼行數:7,代碼來源:PaymentMethods.php

示例8: __construct

 public function __construct()
 {
     parent::__construct();
     $this->addCss('/modules/system/assets/css/updates.css', 'core');
     BackendMenu::setContext('October.System', 'system', 'updates');
     SettingsManager::setContext('October.System', 'updates');
 }
開發者ID:janusnic,項目名稱:OctoberCMS,代碼行數:7,代碼來源:Updates.php

示例9: __construct

 /**
  * Constructor.
  */
 public function __construct()
 {
     parent::__construct();
     BackendMenu::setContext('October.Cms', 'cms', true);
     try {
         if (!($theme = Theme::getEditTheme())) {
             throw new ApplicationException(Lang::get('cms::lang.theme.edit.not_found'));
         }
         $this->theme = $theme;
         new TemplateList($this, 'pageList', function () use($theme) {
             return Page::listInTheme($theme, true);
         });
         new TemplateList($this, 'partialList', function () use($theme) {
             return Partial::listInTheme($theme, true);
         });
         new TemplateList($this, 'layoutList', function () use($theme) {
             return Layout::listInTheme($theme, true);
         });
         new TemplateList($this, 'contentList', function () use($theme) {
             return Content::listInTheme($theme, true);
         });
         new ComponentList($this, 'componentList');
         new AssetList($this, 'assetList');
     } catch (Exception $ex) {
         $this->handleError($ex);
     }
 }
開發者ID:rafasashi,項目名稱:sd-laravel,代碼行數:30,代碼來源:Index.php

示例10: __construct

 public function __construct()
 {
     parent::__construct();
     $this->pageTitle = 'xeor.yandexservicesauth::lang.settings.menu_label';
     BackendMenu::setContext('October.System', 'system', 'settings');
     SettingsManager::setContext('Xeor.YandexServicesAuth', 'settings');
 }
開發者ID:Smony,項目名稱:njphoto,代碼行數:7,代碼來源:Settings.php

示例11: __construct

 public function __construct()
 {
     parent::__construct();
     BackendMenu::setContext('Bm.Field', 'template', 'template');
     $this->addJs('/modules/backend/assets/js/october.treeview.js', 'core');
     $this->bodyClass = '';
 }
開發者ID:zrosiak,項目名稱:fields,代碼行數:7,代碼來源:Template.php

示例12: __construct

 public function __construct()
 {
     parent::__construct();
     BackendMenu::setContext('RAFIE.ContactForm', 'contactform', 'forms');
     $this->addCss('/plugins/rafie/contactform/assets/css/backend_formcontrol.css');
     $this->addJs('/plugins/rafie/contactform/assets/js/backend_formcontrol.js');
 }
開發者ID:tysonrude,項目名稱:bloom7,代碼行數:7,代碼來源:Forms.php

示例13: __construct

 /**
  * Ensure that by default our edit menu sidebar is active
  */
 public function __construct()
 {
     parent::__construct();
     BackendMenu::setContext('BenFreke.MenuManager', 'menumanager', 'edit');
     // Add my assets
     $this->addJs('/plugins/benfreke/menumanager/assets/js/benfreke.menumanager.js');
 }
開發者ID:eugen-stoian,項目名稱:oc-menumanager-plugin,代碼行數:10,代碼來源:Menus.php

示例14: __construct

 public function __construct()
 {
     parent::__construct();
     BackendMenu::setContext('October.System', 'system', 'settings');
     SettingsManager::setContext('Responsiv.Currency', 'currencies');
     $this->addJs('/plugins/responsiv/currency/assets/js/currency-list.js');
 }
開發者ID:responsiv,項目名稱:currency-plugin,代碼行數:7,代碼來源:Currencies.php

示例15: __construct

 /**
  * Class constructor
  */
 public function __construct()
 {
     parent::__construct();
     BackendMenu::setContext('October.System', 'system', 'config');
     SettingsManager::setContext('KoderHut.TemplateTokens', 'token_config');
     $this->addJs('/plugins/koderhut/templatetokens/assets/js/templatetokens.js');
 }
開發者ID:rendler-denis,項目名稱:templatetokens,代碼行數:10,代碼來源:Config.php


注:本文中的Backend\Classes\Controller類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。