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


PHP Croogo::hookAdminTab方法代码示例

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


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

示例1: initialize

 /**
  * initialize
  *
  * @param Controller $controller instance of controller
  * @return void
  */
 public function initialize(Controller $controller)
 {
     $this->_controller = $controller;
     if ($this->_config('multiRole')) {
         Croogo::hookAdminTab('Users/admin_add', 'Roles', 'Acl.admin/roles');
         Croogo::hookAdminTab('Users/admin_edit', 'Roles', 'Acl.admin/roles');
     }
 }
开发者ID:saydulk,项目名称:croogo,代码行数:14,代码来源:AclFilterComponent.php

示例2: _adminTabs

 /**
  * Hook admin tabs
  */
 protected function _adminTabs()
 {
     $controller = Inflector::camelize($this->request->params['controller']);
     $title = __d('pltfrm', 'Webhosting product');
     $element = 'Pltfrm.admin/node_webhosting_product_tab';
     $options = array('elementData' => array('webhostingHostGroups' => array('aaaaa', 'ffffff', 'fdddd')));
     Croogo::hookAdminTab("{$controller}/admin_add", $title, $element, $options);
     Croogo::hookAdminTab("{$controller}/admin_edit", $title, $element, $options);
 }
开发者ID:cvo-technologies,项目名称:pltfrm,代码行数:12,代码来源:WebhostingProductsHelper.php

示例3: _adminTabs

 /**
  * Hook admin tabs when type allows commenting
  */
 protected function _adminTabs()
 {
     if (empty($this->_View->viewVars['type']['Type']['comment_status'])) {
         return;
     }
     $controller = Inflector::camelize($this->request->params['controller']);
     $title = __d('croogo', 'Comments');
     $element = 'Comments.admin/comments_tab';
     Croogo::hookAdminTab("{$controller}/admin_add", $title, $element);
     Croogo::hookAdminTab("{$controller}/admin_edit", $title, $element);
 }
开发者ID:dlpc,项目名称:CakeWX,代码行数:14,代码来源:CommentsHelper.php

示例4: _adminTabs

 /**
  * Hook admin tabs when $taxonomy is set
  */
 protected function _adminTabs()
 {
     $controller = Inflector::camelize($this->request->params['controller']);
     if (empty($this->_View->viewVars['taxonomy']) || $controller == 'Terms') {
         return;
     }
     $title = __d('croogo', 'Terms');
     $element = 'Taxonomy.admin/terms_tab';
     Croogo::hookAdminTab("{$controller}/admin_add", $title, $element);
     Croogo::hookAdminTab("{$controller}/admin_edit", $title, $element);
 }
开发者ID:saydulk,项目名称:croogo,代码行数:14,代码来源:TaxonomiesHelper.php

示例5: _setupRole

 /**
  * Hook admin menu element to set role parent
  */
 protected function _setupRole()
 {
     $title = __d('croogo', 'Parent Role');
     $element = 'Acl.admin/parent_role';
     Croogo::hookAdminTab('Roles/admin_add', $title, $element);
     Croogo::hookAdminTab('Roles/admin_edit', $title, $element);
     $this->_controller->Role->bindAro();
     $id = null;
     if (!empty($this->_controller->request->params['pass'][0])) {
         $id = $this->_controller->request->params['pass'][0];
     }
     $this->_controller->set('parents', $this->_controller->Role->allowedParents($id));
 }
开发者ID:saydulk,项目名称:croogo,代码行数:16,代码来源:AclAccessComponent.php

示例6: initialize

 /**
  * initialize
  *
  * attaches Acl and RowLevelAcl behavior to the controller's primary model and
  * hook the appropriate admin tabs
  */
 public function initialize(Controller $controller)
 {
     $this->_controller = $controller;
     $Model = $controller->{$controller->modelClass};
     $Model->Behaviors->load('Acl', array('className' => 'Croogo.CroogoAcl', 'type' => 'controlled'));
     $Model->Behaviors->load('RowLevelAcl', array('className' => 'Acl.RowLevelAcl'));
     $name = $controller->name;
     $element = 'Acl.admin/row_acl';
     if (!empty($this->settings['adminTabElement'])) {
         $element = $this->settings['adminTabElement'];
     }
     $adminTabActions = array('admin_add', 'admin_edit');
     if (!empty($this->settings['adminTabActions'])) {
         $adminTabActions += $this->settings['adminTabActions'];
     }
     foreach ($adminTabActions as $action) {
         Croogo::hookAdminTab("{$name}/{$action}", __d('croogo', 'Permissions'), $element);
     }
 }
开发者ID:saydulk,项目名称:croogo,代码行数:25,代码来源:RowLevelAclComponent.php

示例7: array

<?php

CroogoNav::add('sidebar', 'webshop.children.orders', array('title' => __d('webshop_orders', 'Orders'), 'url' => array('admin' => true, 'plugin' => 'webshop_orders', 'controller' => 'orders', 'action' => 'index')));
CroogoNav::add('webshop-customer-dashboard', 'orders', array('title' => __d('webshop_orders', 'Orders'), 'url' => array('prefix' => 'panel', 'plugin' => 'webshop_orders', 'controller' => 'orders', 'action' => 'index')));
CroogoNav::add('webshop-dashboard-order-actions', 'view', array('title' => __d('webshop_orders', 'View'), 'url' => array('controller' => 'orders', 'action' => 'view', '_id'), 'htmlAttributes' => array('class' => 'btn-primary')));
CroogoNav::add('webshop-dashboard-order-actions', 'pay', array('title' => __d('webshop_orders', 'Pay'), 'url' => array('controller' => 'orders', 'action' => 'pay', '_id'), 'htmlAttributes' => array('class' => 'btn-success')));
Croogo::hookHelper('*', 'WebshopOrders.Order');
Croogo::hookAdminTab('Customers/admin_view', __d('webshop_orders', 'Orders'), 'WebshopOrders.admin/tab/orders');
开发者ID:cvo-technologies,项目名称:webshop-orders,代码行数:8,代码来源:bootstrap.php

示例8:

Croogo::hookComponent('*', 'Example.Example');
/**
 * Helper
 *
 * This plugin's Example helper will be loaded via NodesController.
 */
Croogo::hookHelper('Nodes', 'Example.Example');
/**
 * Admin menu (navigation)
 *
 * This plugin's admin_menu element will be rendered in admin panel under Extensions menu.
 */
Croogo::hookAdminMenu('Example');
/**
 * Admin row action
 *
 * When browsing the content list in admin panel (Content > List),
 * an extra link called 'Example' will be placed under 'Actions' column.
 */
Croogo::hookAdminRowAction('Nodes/admin_index', 'Example', 'plugin:example/controller:example/action:index/:id');
/**
 * Admin tab
 *
 * When adding/editing Content (Nodes),
 * an extra tab with title 'Example' will be shown with markup generated from the plugin's admin_tab_node element.
 *
 * Useful for adding form extra form fields if necessary.
 */
Croogo::hookAdminTab('Nodes/admin_add', 'Example', 'example.admin_tab_node');
Croogo::hookAdminTab('Nodes/admin_edit', 'Example', 'example.admin_tab_node');
开发者ID:Tamsmiranda,项目名称:croogo,代码行数:30,代码来源:example_bootstrap.php

示例9: array_merge

<?php

CroogoCache::config('switcher_default', array_merge(Configure::read('Cache.defaultConfig'), array('duration' => '+10 minutes')));
Croogo::hookBehavior('Node', 'Switcher.Switcher');
Croogo::hookComponent('*', 'Switcher.Switcher');
Croogo::hookHelper('*', 'Switcher.Switcher');
Croogo::hookAdminTab('Nodes/admin_edit', 'Switcher', 'switcher.admin_tab_node');
Croogo::hookAdminTab('Nodes/admin_add', 'Switcher', 'switcher.admin_tab_node');
CroogoNav::add('extensions.children.switcher', array('title' => 'Switcher', 'url' => '#', 'children' => array('paths' => array('title' => 'Paths', 'url' => array('admin' => true, 'plugin' => 'switcher', 'controller' => 'switcher_paths', 'action' => 'index'), 'weight' => 10), 'nodes' => array('title' => 'Nodes', 'url' => array('admin' => true, 'plugin' => 'nodes', 'controller' => 'nodes', 'action' => 'index'), 'weight' => 20))));
开发者ID:rchavik,项目名称:switcher,代码行数:9,代码来源:bootstrap.php

示例10: array

<?php

Croogo::hookRoutes('Multiattach');
Croogo::hookComponent('Nodes', 'Multiattach.Multiattaches');
Croogo::hookBehavior('Node', 'Multiattach.Multiattach', array());
//Croogo::hookAdminTab('Nodes/admin_add', 'Attachments', 'Multiattach.admin_tab_node');
Croogo::hookAdminTab('Nodes/admin_edit', 'Attachments', 'Multiattach.admin_tab_node');
CroogoNav::add('settings.children.multiattach', array('title' => __('Multiattach'), 'url' => array('plugin' => 'Multiattach', 'controller' => 'Multiattach', 'action' => 'settings'), 'access' => array('admin')));
开发者ID:issasouktel,项目名称:Multiattach,代码行数:8,代码来源:bootstrap.php

示例11: _setPermissionRoots

 protected function _setPermissionRoots()
 {
     $roots = $this->AclAco->getPermissionRoots();
     foreach ($roots as $id => $root) {
         Croogo::hookAdminTab('AclPermissions/admin_index', __d('croogo', $root['Aco']['title']), 'Croogo.blank', array('linkOptions' => array('data-alias' => $root['Aco']['alias'])));
     }
     $this->set(compact('roots'));
 }
开发者ID:saydulk,项目名称:croogo,代码行数:8,代码来源:AclPermissionsController.php

示例12: __d

<?php

Croogo::hookBehavior('Node', 'CustomFields.CustomFieldHolder');
Croogo::hookAdminTab('Nodes/admin_add', __d('custom_fields', 'Custom fields'), 'CustomFields.tab_custom_fields');
Croogo::hookAdminTab('Nodes/admin_edit', __d('custom_fields', 'Custom fields'), 'CustomFields.tab_custom_fields');
开发者ID:cvo-technologies,项目名称:custom-fields,代码行数:5,代码来源:bootstrap.php

示例13:

Croogo::hookComponent('*', 'Revisions.Revisions');
/**
 * Helper
 *
 * This plugin's Revisions helper will be loaded via NodesController.
 */
Croogo::hookHelper('Nodes', 'Revisions.Revisions');
/**
 * Admin menu (navigation)
 *
 * This plugin's admin_menu element will be rendered in admin panel under Extensions menu.
 */
//Croogo::hookAdminMenu('Revisions');
/**
 * Admin row action
 *
 * When browsing the content list in admin panel (Content > List),
 * an extra link called 'Revisions' will be placed under 'Actions' column.
 */
//Croogo::hookAdminRowAction('Nodes/admin_index', 'Revisions', 'controller:nodes/action:edit/:id#node-revisions');
/**
 * Admin tab
 *
 * When adding/editing Content (Nodes),
 * an extra tab with title 'Revisions' will be shown with markup generated from the plugin's admin_tab_node element.
 *
 * Useful for adding form extra form fields if necessary.
 */
Croogo::hookAdminTab('Nodes/admin_add', 'Revisions', 'Revisions.admin_tab_node');
Croogo::hookAdminTab('Nodes/admin_edit', 'Revisions', 'Revisions.admin_tab_node');
开发者ID:rchavik,项目名称:revisions,代码行数:30,代码来源:revisions_bootstrap.php

示例14: array_merge

<?php

$cacheConfig = array_merge(Configure::read('Cache.defaultConfig'), array('groups' => array('seo_lite')));
CroogoCache::config('seo_lite', $cacheConfig);
Configure::write('Seolite.keys', array('meta_keywords' => array('label' => __d('seolite', 'Keywords')), 'meta_description' => array('label' => __d('seolite', 'Description')), 'rel_canonical' => array('label' => __d('seolite', 'Canonical Page'))));
Croogo::hookHelper('*', 'Seolite.SeoLite');
$queryString = env('REQUEST_URI');
if (strpos($queryString, 'admin') === false) {
    return;
}
/*
 * stuff for /admin routes only
 */
Croogo::hookBehavior('Node', 'Seolite.SeoCustomFields', array('priority' => 1));
$title = 'SeoLite';
$element = 'Seolite.admin/meta';
$options = array('elementData' => array('field' => 'body'));
Croogo::hookAdminTab('Nodes/admin_add', $title, $element, $options);
Croogo::hookAdminTab('Nodes/admin_edit', $title, $element, $options);
$options['elementData']['field'] = 'description';
Croogo::hookAdminTab('SeoLiteUrls/admin_add', $title, $element, $options);
Croogo::hookAdminTab('SeoLiteUrls/admin_edit', $title, $element, $options);
CroogoNav::add('sidebar', 'extensions.children.seo_lite', array('title' => 'SeoLite', 'url' => 'javascript:void(0)', 'children' => array('urls' => array('title' => __d('seo_lite', 'Meta by URL'), 'url' => array('admin' => true, 'plugin' => 'seolite', 'controller' => 'seo_lite_urls', 'action' => 'index')))));
开发者ID:xintesa,项目名称:seolite,代码行数:23,代码来源:bootstrap.php

示例15: array

<?php

Croogo::hookBehavior('Node', 'Sites.SiteFilter', array('relationship' => array('hasAndBelongsToMany' => array('Site' => array('className' => 'Sites.Site', 'with' => 'Sites.SitesNode', 'foreignKey' => 'node_id', 'associationForeignKey' => 'site_id', 'unique' => 'keepExisting')))));
Croogo::hookBehavior('Block', 'Sites.SiteFilter', array('relationship' => array('hasAndBelongsToMany' => array('Site' => array('className' => 'Sites.Site', 'with' => 'Sites.SitesBlock', 'foreignKey' => 'block_id', 'associationForeignKey' => 'site_id', 'unique' => 'keepExisting', 'joinTable' => 'sites_blocks')))));
Croogo::hookBehavior('Link', 'Sites.SiteFilter', array('relationship' => array('hasAndBelongsToMany' => array('Site' => array('className' => 'Sites.Site', 'with' => 'Sites.SitesLink', 'foreignKey' => 'link_id', 'associationForeignKey' => 'site_id', 'unique' => 'keepExisting', 'joinTable' => 'sites_links')))));
if (Configure::read('Cakeforum.name') !== false) {
    Croogo::hookBehavior('ForumCategory', 'Sites.SiteFilter', array('relationship' => array('hasAndBelongsToMany' => array('Site' => array('className' => 'Sites.Site', 'with' => 'Sites.SitesForumCategory', 'foreignKey' => 'forum_category_id', 'associationForeignKey' => 'site_id')))));
    Croogo::hookComponent('ForumCategories', 'Sites.SiteFilter');
}
Croogo::hookComponent('*', array('Sites.Multisite' => array('priority' => 5)));
Croogo::hookHelper('*', 'Sites.Sites');
// uncomment this line to use absolute url for menu links
// alternatively, you can hook this helper later via other plugins
// Croogo::hookHelper('*', 'Sites.SitesMenus');
Croogo::hookAdminTab('Nodes/admin_add', 'Sites', 'sites.sites_selection');
Croogo::hookAdminTab('Nodes/admin_edit', 'Sites', 'sites.sites_selection');
Croogo::hookAdminTab('Attachments/admin_add', 'Sites', 'sites.sites_selection');
Croogo::hookAdminTab('Attachments/admin_edit', 'Sites', 'sites.sites_selection');
Croogo::hookAdminTab('Blocks/admin_add', 'Sites', 'sites.sites_selection');
Croogo::hookAdminTab('Blocks/admin_edit', 'Sites', 'sites.sites_selection');
Croogo::hookAdminTab('Links/admin_add', 'Sites', 'sites.sites_selection');
Croogo::hookAdminTab('Links/admin_edit', 'Sites', 'sites.sites_selection');
$cacheConfig = Cache::config('_cake_model_');
$cacheConfig = Hash::merge($cacheConfig['settings'], array('prefix' => 'sites_', 'path' => CACHE . 'queries', 'duration' => '+1 hour'));
Cache::config('sites', $cacheConfig);
require 'admin_menu.php';
开发者ID:daniel-neumann,项目名称:sites,代码行数:26,代码来源:bootstrap.php


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