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


PHP Croogo::hookAdminBox方法代碼示例

本文整理匯總了PHP中Croogo::hookAdminBox方法的典型用法代碼示例。如果您正苦於以下問題:PHP Croogo::hookAdminBox方法的具體用法?PHP Croogo::hookAdminBox怎麽用?PHP Croogo::hookAdminBox使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Croogo的用法示例。


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

示例1: _adminTabs

 /**
  * Hook admin tabs for controllers whom its primary model has MetaBehavior attached.
  */
 protected function _adminTabs()
 {
     $Model = $this->_controller->{$this->_controller->modelClass};
     if ($Model && !$Model->Behaviors->attached('Meta')) {
         return;
     }
     $controller = $this->_controller->name;
     $title = __d('croogo', 'Custom Fields');
     $element = 'Meta.admin/meta_tab';
     Croogo::hookAdminBox("{$controller}/admin_add", $title, $element);
     Croogo::hookAdminBox("{$controller}/admin_edit", $title, $element);
 }
開發者ID:dlpc,項目名稱:CakeWX,代碼行數:15,代碼來源:MetaComponent.php

示例2: array

CroogoNav::add('sidebar', 'webshop', array('title' => __d('webshop', 'Webshop'), 'url' => '#', 'weight' => 30, 'children' => array('customers' => array('title' => __d('webshop', 'Customers'), 'url' => array('plugin' => 'webshop', 'controller' => 'customers', 'action' => 'index')), 'products' => array('title' => __d('webshop', 'Products'), 'url' => array('plugin' => 'webshop', 'controller' => 'products', 'action' => 'index')), 'Configuration groups' => array('title' => __d('webshop', 'Configuration groups'), 'url' => array('plugin' => 'webshop', 'controller' => 'configuration_groups', 'action0' => 'index')), 'Configuration options' => array('title' => __d('webshop', 'Configuration options'), 'url' => array('plugin' => 'webshop', 'controller' => 'configuration_options', 'action' => 'index')), 'configuration' => array('title' => __d('webshop', 'Configuration'), 'url' => '#'))));
CroogoNav::add('sidebar', 'settings.children.webshop', array('title' => __d('webshop', 'Webshop'), 'url' => '#'));
CroogoNav::add('webshop-dashboard-address_details-actions', 'edit', array('title' => __d('webshop', 'Edit'), 'url' => array('controller' => 'address_details', 'action' => 'edit', '_id'), 'htmlAttributes' => array('class' => 'btn-primary')));
CroogoNav::add('webshop-dashboard-customer_contacts-actions', 'edit', array('title' => __d('webshop', 'Edit'), 'url' => array('controller' => 'customer_contacts', 'action' => 'edit', '_id'), 'htmlAttributes' => array('class' => 'btn-primary')));
//endregion
//region Helpers
Croogo::hookHelper('*', 'Webshop.Product');
Croogo::hookHelper('*', 'Webshop.ConfigurationOption');
Croogo::hookHelper('*', 'Webshop.Webshop');
//endregion
//region Behaviors
Croogo::hookBehavior('Node', 'Webshop.Product');
//endregion
//region Components
Croogo::hookComponent('*', 'Webshop.CustomerAccess');
//endregion
Configure::write('Webshop.customer_access_providers', array());
Croogo::mergeConfig('Translate.models.ConfigurationOption', array('fields' => array('name' => 'nameTranslation'), 'translateModel' => 'Webshop.ConfigurationOption'));
//region Panel prefix setup
Croogo::mergeConfig('Routing.prefixes', array('panel'));
Router::reload();
//endregion
//region Admin panels
//region Admin tabs
Croogo::hookAdminTab('Products/admin_edit', 'Configuration implementation', 'Pltfrm.admin/node_webhosting_product_tab');
//endregion
//region Admin hooks
Croogo::hookAdminBox('Products/admin_edit', 'Configuration group', 'Webshop.admin/product/box_configuration_group_selector');
//endregion
//endregion
App::build(array('CustomerAccessProvider' => array('%s' . 'CustomerAccessProvider' . DS)), App::REGISTER);
開發者ID:cvo-technologies,項目名稱:croogo-webshop-plugin,代碼行數:31,代碼來源:bootstrap.php


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