本文整理汇总了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);
}
示例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);