本文整理汇总了PHP中ControllerActionsName::createMenusRoles方法的典型用法代码示例。如果您正苦于以下问题:PHP ControllerActionsName::createMenusRoles方法的具体用法?PHP ControllerActionsName::createMenusRoles怎么用?PHP ControllerActionsName::createMenusRoles使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ControllerActionsName
的用法示例。
在下文中一共展示了ControllerActionsName::createMenusRoles方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
<?php
$this->breadcrumbs = array('UsersActions');
$menus = array(array('label' => 'Create User Privileges', 'url' => array('create')));
$this->menu = ControllerActionsName::createMenusRoles($menus, $actions);
Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n\t\$('.search-form').toggle();\n\treturn false;\n});\n\$('.search-form form').submit(function(){\n\t\$.fn.yiiGridView.update('users-actions-grid', {\n url : \$(this).attr('action'),\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n");
Yii::app()->clientScript->registerScript('ajaxupdate', "\n\$('#users-actions-grid a.ajaxupdate').live('click', function() {\n \$.fn.yiiGridView.update('users-actions-grid', {\n type: 'POST',\n url: \$(this).attr('href'),\n success: function() {\n \$.fn.yiiGridView.update('users-actions-grid');\n }\n });\n return false;\n});\n");
?>
<h1>List Users Actions</h1>
<?php
echo CHtml::link('Advanced Search', '#', array('class' => 'search-button'));
?>
<div class="search-form" style="display:none">
<?php
$this->renderPartial('_search', array('model' => $model));
?>
</div><!-- search-form -->
<?php
$this->widget('zii.widgets.grid.CGridView', array('id' => 'users-actions-grid', 'dataProvider' => $model->search(), 'columns' => array(array('header' => 'S/N', 'type' => 'raw', 'value' => '$this->grid->dataProvider->pagination->currentPage * $this->grid->dataProvider->pagination->pageSize + ($row+1)', 'headerHtmlOptions' => array('width' => '30px', 'style' => 'text-align:center;'), 'htmlOptions' => array('style' => 'text-align:center;')), 'user.username', 'module', 'controller', 'actions', 'type', array('class' => 'CButtonColumn', 'template' => ControllerActionsName::createIndexButtonRoles($actions)))));