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


PHP Classes\SettingsManager类代码示例

本文整理汇总了PHP中System\Classes\SettingsManager的典型用法代码示例。如果您正苦于以下问题:PHP SettingsManager类的具体用法?PHP SettingsManager怎么用?PHP SettingsManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: __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

示例2: register

 /**
  * Register the service provider.
  *
  * @return void
  */
 public function register()
 {
     parent::register('cms');
     /*
      * Register navigation
      */
     BackendMenu::registerCallback(function ($manager) {
         $manager->registerMenuItems('October.Cms', ['cms' => ['label' => 'cms::lang.cms.menu_label', 'icon' => 'icon-magic', 'url' => Backend::url('cms'), 'permissions' => ['cms.*'], 'order' => 10, 'sideMenu' => ['pages' => ['label' => 'cms::lang.page.menu_label', 'icon' => 'icon-copy', 'url' => 'javascript:;', 'attributes' => ['data-menu-item' => 'pages'], 'permissions' => ['cms.manage_pages'], 'counterLabel' => 'cms::lang.page.unsaved_label'], 'partials' => ['label' => 'cms::lang.partial.menu_label', 'icon' => 'icon-tags', 'url' => 'javascript:;', 'attributes' => ['data-menu-item' => 'partials'], 'permissions' => ['cms.manage_partials'], 'counterLabel' => 'cms::lang.partial.unsaved_label'], 'layouts' => ['label' => 'cms::lang.layout.menu_label', 'icon' => 'icon-th-large', 'url' => 'javascript:;', 'attributes' => ['data-menu-item' => 'layouts'], 'permissions' => ['cms.manage_layouts'], 'counterLabel' => 'cms::lang.layout.unsaved_label'], 'content' => ['label' => 'cms::lang.content.menu_label', 'icon' => 'icon-file-text-o', 'url' => 'javascript:;', 'attributes' => ['data-menu-item' => 'content'], 'permissions' => ['cms.manage_content'], 'counterLabel' => 'cms::lang.content.unsaved_label'], 'assets' => ['label' => 'cms::lang.asset.menu_label', 'icon' => 'icon-picture-o', 'url' => 'javascript:;', 'attributes' => ['data-menu-item' => 'assets'], 'permissions' => ['cms.manage_assets'], 'counterLabel' => 'cms::lang.asset.unsaved_label'], 'components' => ['label' => 'cms::lang.component.menu_label', 'icon' => 'icon-puzzle-piece', 'url' => 'javascript:;', 'attributes' => ['data-menu-item' => 'components'], 'permissions' => ['cms.manage_pages', 'cms.manage_layouts', 'cms.manage_partials']]]]]);
     });
     /*
      * Register permissions
      */
     BackendAuth::registerCallback(function ($manager) {
         $manager->registerPermissions('October.Cms', ['cms.manage_content' => ['label' => 'cms::lang.permissions.manage_content', 'tab' => 'Cms'], 'cms.manage_assets' => ['label' => 'cms::lang.permissions.manage_assets', 'tab' => 'Cms'], 'cms.manage_pages' => ['label' => 'cms::lang.permissions.manage_pages', 'tab' => 'Cms'], 'cms.manage_layouts' => ['label' => 'cms::lang.permissions.manage_layouts', 'tab' => 'Cms'], 'cms.manage_partials' => ['label' => 'cms::lang.permissions.manage_partials', 'tab' => 'Cms'], 'cms.manage_themes' => ['label' => 'cms::lang.permissions.manage_themes', 'tab' => 'Cms']]);
     });
     /*
      * Register widgets
      */
     WidgetManager::instance()->registerFormWidgets(function ($manager) {
         $manager->registerFormWidget('Cms\\FormWidgets\\Components');
     });
     /*
      * Register settings
      */
     SettingsManager::instance()->registerCallback(function ($manager) {
         $manager->registerSettingItems('October.Cms', ['theme' => ['label' => 'cms::lang.theme.settings_menu', 'description' => 'cms::lang.theme.settings_menu_description', 'category' => SettingsManager::CATEGORY_CMS, 'icon' => 'icon-picture-o', 'url' => Backend::URL('cms/themes'), 'order' => 200], 'maintenance_settings' => ['label' => 'cms::lang.maintenance.settings_menu', 'description' => 'cms::lang.maintenance.settings_menu_description', 'category' => SettingsManager::CATEGORY_CMS, 'icon' => 'icon-plug', 'class' => 'Cms\\Models\\MaintenanceSettings', 'order' => 400]]);
     });
     /*
      * Register components
      */
     ComponentManager::instance()->registerComponents(function ($manager) {
         $manager->registerComponent('Cms\\Classes\\ViewBag', 'viewBag');
     });
 }
开发者ID:nnmer,项目名称:october,代码行数:39,代码来源:ServiceProvider.php

示例3: __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

示例4: __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

示例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('October.System', 'system', 'settings');
     SettingsManager::setContext('Responsiv.Pay', 'types');
     GatewayManager::createPartials();
 }
开发者ID:dogiedog,项目名称:pay-plugin,代码行数:7,代码来源:PaymentMethods.php

示例7: __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

示例8: __construct

 public function __construct()
 {
     parent::__construct();
     BackendMenu::setContext('October.System', 'system', 'settings');
     SettingsManager::setContext('RainLab.Sitemap', 'definitions');
     $this->addJs('/modules/backend/assets/js/october.treeview.js', 'core');
     $this->addJs('/plugins/rainlab/sitemap/assets/js/sitemap-definitions.js');
 }
开发者ID:mechiko,项目名称:staff-october,代码行数:8,代码来源:Definitions.php

示例9: __construct

 /**
  * Constructor.
  */
 public function __construct()
 {
     parent::__construct();
     $this->addCss('/modules/cms/assets/css/october.theme-selector.css', 'core');
     $this->pageTitle = 'cms::lang.theme.settings_menu';
     BackendMenu::setContext('October.System', 'system', 'settings');
     SettingsManager::setContext('October.Cms', 'theme');
 }
开发者ID:nnmer,项目名称:october,代码行数:11,代码来源:Themes.php

示例10: register

 /**
  * Register the service provider.
  *
  * @return void
  */
 public function register()
 {
     parent::register('backend');
     /*
      * Register widgets
      */
     WidgetManager::instance()->registerFormWidgets(function ($manager) {
         $manager->registerFormWidget('Backend\\FormWidgets\\CodeEditor', ['label' => 'Code editor', 'code' => 'codeeditor']);
         $manager->registerFormWidget('Backend\\FormWidgets\\RichEditor', ['label' => 'Rich editor', 'code' => 'richeditor']);
         $manager->registerFormWidget('Backend\\FormWidgets\\FileUpload', ['label' => 'File uploader', 'code' => 'fileupload']);
         $manager->registerFormWidget('Backend\\FormWidgets\\Relation', ['label' => 'Relationship', 'code' => 'relation']);
         $manager->registerFormWidget('Backend\\FormWidgets\\DatePicker', ['label' => 'Date picker', 'code' => 'datepicker']);
         $manager->registerFormWidget('Backend\\FormWidgets\\TimePicker', ['label' => 'Time picker', 'code' => 'timepicker']);
         $manager->registerFormWidget('Backend\\FormWidgets\\ColorPicker', ['label' => 'Color picker', 'code' => 'colorpicker']);
         $manager->registerFormWidget('Backend\\FormWidgets\\DataGrid', ['label' => 'Data Grid', 'code' => 'datagrid']);
         // @deprecated if year >= 2016
         $manager->registerFormWidget('Backend\\FormWidgets\\DataTable', ['label' => 'Data Table', 'code' => 'datatable']);
         $manager->registerFormWidget('Backend\\FormWidgets\\RecordFinder', ['label' => 'Record Finder', 'code' => 'recordfinder']);
         $manager->registerFormWidget('Backend\\FormWidgets\\Repeater', ['label' => 'Repeater', 'code' => 'repeater']);
     });
     /*
      * Register navigation
      */
     BackendMenu::registerCallback(function ($manager) {
         $manager->registerMenuItems('October.Backend', ['dashboard' => ['label' => 'backend::lang.dashboard.menu_label', 'icon' => 'icon-dashboard', 'url' => Backend::url('backend'), 'permissions' => ['backend.access_dashboard'], 'order' => 1]]);
     });
     /*
      * Register settings
      */
     SettingsManager::instance()->registerCallback(function ($manager) {
         $manager->registerSettingItems('October.Backend', ['branding' => ['label' => 'backend::lang.branding.menu_label', 'description' => 'backend::lang.branding.menu_description', 'category' => SettingsManager::CATEGORY_SYSTEM, 'icon' => 'icon-paint-brush', 'class' => 'Backend\\Models\\BrandSettings', 'order' => 500], 'editor' => ['label' => 'backend::lang.editor.menu_label', 'description' => 'backend::lang.editor.menu_description', 'category' => SettingsManager::CATEGORY_MYSETTINGS, 'icon' => 'icon-code', 'url' => Backend::URL('backend/editorpreferences'), 'order' => 600, 'context' => 'mysettings'], 'backend_preferences' => ['label' => 'backend::lang.backend_preferences.menu_label', 'description' => 'backend::lang.backend_preferences.menu_description', 'category' => SettingsManager::CATEGORY_MYSETTINGS, 'icon' => 'icon-laptop', 'class' => 'Backend\\Models\\BackendPreferences', 'order' => 500, 'context' => 'mysettings'], 'myaccount' => ['label' => 'backend::lang.myaccount.menu_label', 'description' => 'backend::lang.myaccount.menu_description', 'category' => SettingsManager::CATEGORY_MYSETTINGS, 'icon' => 'icon-user', 'url' => Backend::URL('backend/users/myaccount'), 'order' => 400, 'context' => 'mysettings', 'keywords' => 'backend::lang.myaccount.menu_keywords'], 'access_logs' => ['label' => 'backend::lang.access_log.menu_label', 'description' => 'backend::lang.access_log.menu_description', 'category' => SettingsManager::CATEGORY_LOGS, 'icon' => 'icon-lock', 'url' => Backend::url('backend/accesslogs'), 'permissions' => ['backend.access_admin_logs'], 'order' => 800]]);
     });
     /*
      * Register permissions
      */
     BackendAuth::registerCallback(function ($manager) {
         $manager->registerPermissions('October.Backend', ['backend.access_dashboard' => ['label' => 'system::lang.permissions.view_the_dashboard', 'tab' => 'system::lang.permissions.name'], 'backend.manage_users' => ['label' => 'system::lang.permissions.manage_other_administrators', 'tab' => 'system::lang.permissions.name']]);
     });
     /*
      * Register mail templates
      */
     MailTemplate::registerCallback(function ($template) {
         $template->registerMailTemplates(['backend::mail.invite' => 'Invitation for newly created administrators.', 'backend::mail.restore' => 'Password reset instructions for backend-end administrators.']);
     });
     /*
      * Register asset bundles
      */
     CombineAssets::registerCallback(function ($combiner) {
         $combiner->registerBundle('~/modules/backend/assets/less/controls.less');
         $combiner->registerBundle('~/modules/backend/assets/less/october.less');
         $combiner->registerBundle('~/modules/backend/assets/js/october.js');
         $combiner->registerBundle('~/modules/backend/assets/js/vendor/vendor.js');
         $combiner->registerBundle('~/modules/backend/widgets/table/assets/js/build.js');
         $combiner->registerBundle('~/modules/backend/formwidgets/datepicker/assets/js/build.js');
         $combiner->registerBundle('~/modules/backend/formwidgets/richeditor/assets/less/richeditor.less');
         $combiner->registerBundle('~/modules/backend/formwidgets/richeditor/assets/js/build.js');
     });
 }
开发者ID:pietercolpaert,项目名称:swagsite,代码行数:63,代码来源:ServiceProvider.php

示例11: __construct

 /**
  * Constructor.
  */
 public function __construct()
 {
     parent::__construct();
     $this->addCss('/modules/backend/formwidgets/codeeditor/assets/css/codeeditor.css', 'core');
     $this->addJs('/modules/backend/formwidgets/codeeditor/assets/js/build-min.js', 'core');
     $this->addJs('/modules/backend/assets/js/preferences/preferences.js', 'core');
     BackendMenu::setContext('October.System', 'system', 'mysettings');
     SettingsManager::setContext('October.Backend', 'preferences');
 }
开发者ID:aaronleslie,项目名称:aaronunix,代码行数:12,代码来源:Preferences.php

示例12: __construct

 public function __construct()
 {
     parent::__construct();
     SettingsManager::setContext('Mohsin.Txt', 'robots');
     BackendMenu::setContext('October.System', 'system', 'settings');
     if (!Setting::get('use_robots')) {
         $this->enabled = false;
     }
 }
开发者ID:Danielberry90,项目名称:Txt,代码行数:9,代码来源:Robots.php

示例13: __construct

 public function __construct()
 {
     parent::__construct();
     BackendMenu::setContext('Klubitus.Calendar', 'calendar', 'import');
     SettingsManager::setContext('Klubitus.Calendar', 'settings');
     $this->vars['importEnabled'] = $this->importEnabled = (bool) CalendarSettings::get('facebook_import_enabled');
     $this->vars['importUrl'] = $this->importUrl = CalendarSettings::get('facebook_import_url');
     $this->vars['importUser'] = $this->importUser = UserModel::find(CalendarSettings::get('facebook_import_user_id'));
 }
开发者ID:anqqa,项目名称:oc-calendar-plugin,代码行数:9,代码来源:Import.php

示例14: __construct

 public function __construct()
 {
     parent::__construct();
     $this->addJs('/modules/system/assets/js/updates/updates.js', 'core');
     $this->addCss('/modules/system/assets/css/updates/updates.css', 'core');
     BackendMenu::setContext('October.System', 'system', 'updates');
     SettingsManager::setContext('October.System', 'updates');
     if ($this->getAjaxHandler() == 'onExecuteStep') {
         $this->useSecurityToken = false;
     }
 }
开发者ID:betes-curieuses-design,项目名称:ElieJosiePhotographie,代码行数:11,代码来源:Updates.php

示例15: findSettingItem

 /**
  * Locates a setting item for a module or plugin
  */
 protected function findSettingItem($author, $plugin, $code)
 {
     $manager = SettingsManager::instance();
     $moduleOwner = $author;
     $moduleCode = $plugin;
     $item = $manager->findSettingItem($moduleOwner, $moduleCode);
     if (!$item) {
         $pluginOwner = $author . '.' . $plugin;
         $pluginCode = $code;
         $item = $manager->findSettingItem($pluginOwner, $pluginCode);
     }
     return $item;
 }
开发者ID:betes-curieuses-design,项目名称:ElieJosiePhotographie,代码行数:16,代码来源:Settings.php


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