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


PHP Rights::getAuthItemRoute方法代码示例

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


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

示例1: getNameLink

 /**
  * Returns the markup for the name link.
  * @param boolean whether to display the human readable or system name.
  * @param boolean whether to display the child count.
  * @param boolean whether to display the sortable id.
  * @return string the markup.
  */
 public function getNameLink($humanReadable = true, $displayChildCount = false, $displaySortableId = false)
 {
     $markup = CHtml::link($this->getNameText($humanReadable), array('authItem/update', 'name' => $this->owner->name, 'redirect' => urlencode(Rights::getAuthItemRoute($this->owner->type))));
     if ($displayChildCount === true) {
         $markup .= $this->childCount();
     }
     if ($displaySortableId === true) {
         $markup .= $this->sortableId();
     }
     return $markup;
 }
开发者ID:rusli-nasir,项目名称:smsempresayii,代码行数:18,代码来源:RightsAuthItemBehavior.php

示例2: array

<?php

$this->breadcrumbs = array('Rights' => Rights::getBaseUrl(), Rights::getAuthItemTypeNamePlural($model->type) => Rights::getAuthItemRoute($model->type), $model->name);
$this->renderPartial('/_menu');
?>

<div id="updatedAuthItem">

    <h2><?php 
echo Rights::t('core', 'Update :name', array(':name' => $model->name, ':type' => Rights::getAuthItemTypeName($model->type)));
?>
</h2>

    <?php 
$this->renderPartial('_form', array('model' => $formModel));
?>

    <div class="relations span-11 last">

        <h3><?php 
echo Rights::t('core', 'Relations');
?>
</h3>

        <?php 
if ($model->name !== Rights::module()->superuserName) {
    ?>

            <div class="parents">

                <h4><?php 
开发者ID:ZK413,项目名称:yiimine,代码行数:31,代码来源:update.php

示例3: actionCreate

 /**
  * Creates an authorization item.
  */
 public function actionCreate()
 {
     // Make sure that we have a type
     if (isset($_GET['type']) === true) {
         // Create the authorization item form
         $form = new CForm('rights.views.authItem.authItemForm', new AuthItemForm('create'));
         // Form is submitted and data is valid, redirect the user
         if ($form->submitted() === true && $form->validate() === true) {
             // Create the item
             $item = $this->_authorizer->createAuthItem($form->model->name, $_GET['type'], $form->model->description, $form->model->bizRule, $form->model->data);
             // Set a flash message for creating the item
             Yii::app()->user->setFlash($this->module->flashSuccessKey, Rights::t('core', ':name created.', array(':name' => $form->model->name)));
             // Redirect to the correct destination
             $this->redirect(array(Rights::getAuthItemRoute($_GET['type'])));
         }
     } else {
         throw new CHttpException(404, Rights::t('core', 'Invalid authorization item type.'));
     }
     // Render the view
     $this->render('create', array('form' => $form));
 }
开发者ID:rusli-nasir,项目名称:smsempresayii,代码行数:24,代码来源:AuthItemController.php

示例4: array

<?php $this->breadcrumbs = array(
	'Rights'=>Rights::getBaseUrl(),
	Rights::getAuthItemTypeNamePlural($model->type)=>Rights::getAuthItemRoute($model->type),
	$model->name,
); ?>

<div id="updatedAuthItem">

	<h2><?php echo Rights::t('core', 'Update :name', array(
		':name'=>$model->name,
		':type'=>Rights::getAuthItemTypeName($model->type),
	)); ?></h2>

	<?php $this->renderPartial('_form', array('model'=>$formModel)); ?>

	<div class="relations span-11 last">

		<h3><?php echo Rights::t('core', 'Relations'); ?></h3>

		<?php if( $model->name!==Rights::module()->superuserName ): ?>

			<div class="parents">

				<h4><?php echo Rights::t('core', 'Parents'); ?></h4>

				<?php $this->widget('zii.widgets.grid.CGridView', array(
					'dataProvider'=>$parentDataProvider,
					'template'=>'{items}',
					'hideHeader'=>true,
					'emptyText'=>Rights::t('core', 'This item has no parents.'),
					'htmlOptions'=>array('class'=>'grid-view parent-table mini'),
开发者ID:rinodung,项目名称:EduSec3.0.0,代码行数:31,代码来源:update.php

示例5: array

<?php

$this->breadcrumbs = array('Home' => $this->createUrl('/admin'), 'Права доступа' => Rights::getBaseUrl(), Rights::getAuthItemTypeNamePlural($model->type) => Rights::getAuthItemRoute($model->type), $model->name);
$this->pageHeader = Rights::t('core', 'Update :name', array(':name' => $model->name, ':type' => Rights::getAuthItemTypeName($model->type)));
$this->sidebarContent = $this->renderPartial('/_menu', null, true);
?>

<div id="rights" class="">
<div id="updatedAuthItem">

	<?php 
$this->renderPartial('_form', array('model' => $formModel));
?>

	<div class="relations padding-all">

		<h3><?php 
echo Rights::t('core', 'Relations');
?>
</h3>

		<?php 
if ($model->name !== Rights::module()->superuserName) {
    ?>

	<div class="form wide">
		<div class="row">
			<label><?php 
    echo Rights::t('core', 'Parents');
    ?>
</label>
开发者ID:kolbensky,项目名称:rybolove,代码行数:31,代码来源:update.php


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