作者:rendler-deni
项目:templatetoken
/**
* 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');
}
作者:nnme
项目:octobe
/**
* 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');
});
}
作者:janusni
项目:OctoberCM
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');
}
作者:responsi
项目:currency-plugi
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');
}
作者:aral
项目:recetariu
/**
* 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');
}
作者:dogiedo
项目:pay-plugi
public function __construct()
{
parent::__construct();
BackendMenu::setContext('October.System', 'system', 'settings');
SettingsManager::setContext('Responsiv.Pay', 'types');
GatewayManager::createPartials();
}
作者:Smon
项目:njphot
public function __construct()
{
parent::__construct();
$this->pageTitle = 'xeor.yandexservicesauth::lang.settings.menu_label';
BackendMenu::setContext('October.System', 'system', 'settings');
SettingsManager::setContext('Xeor.YandexServicesAuth', 'settings');
}
作者:mechik
项目:staff-octobe
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');
}
作者:nnme
项目:octobe
/**
* 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');
}
作者:pietercolpaer
项目:swagsit
/**
* 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');
});
}
作者:aaronlesli
项目:aaronuni
/**
* 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');
}
作者:Danielberry9
项目:Tx
public function __construct()
{
parent::__construct();
SettingsManager::setContext('Mohsin.Txt', 'robots');
BackendMenu::setContext('October.System', 'system', 'settings');
if (!Setting::get('use_robots')) {
$this->enabled = false;
}
}
作者:anqq
项目:oc-calendar-plugi
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'));
}
作者:betes-curieuses-desig
项目:ElieJosiePhotographi
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;
}
}
作者:betes-curieuses-desig
项目:ElieJosiePhotographi
/**
* 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;
}
作者:pietercolpaer
项目:swagsit
/**
* 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');
/*
* Enable AJAX for Form widgets
*/
if (post('mode') == 'import') {
$this->makeImportFormWidget($this->findThemeObject())->bindToController();
}
}
作者:360webo
项目:octobe
/**
* 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', 'alias' => 'codeeditor']);
$manager->registerFormWidget('Backend\\FormWidgets\\RichEditor', ['label' => 'Rich editor', 'alias' => 'richeditor']);
$manager->registerFormWidget('Backend\\FormWidgets\\FileUpload', ['label' => 'File uploader', 'alias' => 'fileupload']);
$manager->registerFormWidget('Backend\\FormWidgets\\Relation', ['label' => 'Relationship', 'alias' => 'relation']);
$manager->registerFormWidget('Backend\\FormWidgets\\Datepicker', ['label' => 'Date picker', 'alias' => 'datepicker']);
$manager->registerFormWidget('Backend\\FormWidgets\\DataGrid', ['label' => 'Data Grid', 'alias' => 'datagrid']);
$manager->registerFormWidget('Backend\\FormWidgets\\RecordFinder', ['label' => 'Record Finder', 'alias' => 'recordfinder']);
});
/*
* Register navigation
*/
BackendMenu::registerCallback(function ($manager) {
$manager->registerMenuItems('October.Backend', ['dashboard' => ['label' => 'backend::lang.dashboard.menu_label', 'icon' => 'icon-home', 'url' => Backend::url('backend'), 'permissions' => ['backend.access_dashboard'], 'order' => 1]]);
});
/*
* Register settings
*/
SettingsManager::instance()->registerCallback(function ($manager) {
$manager->registerSettingItems('October.Backend', ['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'], 'backend.manage_users' => ['label' => 'system::lang.permissions.manage_other_administrators', 'tab' => 'System']]);
});
/*
* 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.']);
});
}
作者:andytan262
项目:andytan.ne
protected function registerBackendSettings()
{
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'), 'permissions' => ['cms.manage_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', 'permissions' => ['cms.manage_themes'], 'order' => 300]]);
});
}
作者:janusni
项目:OctoberCM
public function __construct()
{
parent::__construct();
BackendMenu::setContext('October.System', 'system', 'settings');
SettingsManager::setContext('RainLab.User', 'location');
}
作者:GeGee
项目:octobe
protected function registerBackendSettings()
{
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', 'permissions' => ['backend.manage_branding'], 'order' => 500], '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' => 500, 'context' => 'mysettings', 'keywords' => 'backend::lang.myaccount.menu_keywords'], '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' => 510, 'context' => 'mysettings'], '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' => 520, 'context' => 'mysettings'], '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' => ['system.access_logs'], 'order' => 920]]);
});
}