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


PHP JModelAdmin::allowEdit方法代码示例

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


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

示例1: allowEdit

 /**
  * Method override to check if you can edit an existing record.
  *
  * @param	array	$data	An array of input data.
  * @param	string	$key	The name of the key for the primary key.
  *
  * @return	boolean
  * @since	1.6
  */
 protected function allowEdit($data = array(), $key = 'id')
 {
     // Check specific edit permission then general edit permission.
     return JFactory::getUser()->authorise('core.edit', 'com_fieldsattach.message.' . ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key);
 }
开发者ID:AxelFG,项目名称:ckbran-inf,代码行数:14,代码来源:fieldsattachgroup.php

示例2: allowEdit

 /**
  * Method override to check if you can edit an existing record.
  *
  * @param   array  $data An array of input data.
  * @param   string $key  The name of the key for the primary key.
  *
  * @return  boolean
  */
 protected function allowEdit($data = array(), $key = 'id')
 {
     // Initialise variables.
     $recordId = (int) isset($data[$key]) ? $data[$key] : 0;
     $user = JFactory::getUser();
     $userId = $user->get('id');
     // Check general edit permission first.
     if ($user->authorise('core.edit', 'com_modules.module.' . $recordId)) {
         return true;
     }
     // Since there is no asset tracking, revert to the component permissions.
     return parent::allowEdit($data, $key);
 }
开发者ID:jputz12,项目名称:OneNow-Vshop,代码行数:21,代码来源:module.php

示例3: allowEdit

 /**
  * Method override to check if you can edit an existing record.
  *
  * @param	array	$data	An array of input data.
  * @param	string	$key	The name of the key for the primary key.
  *
  * @return	boolean
  * @since	1.7
  */
 protected function allowEdit($data = array(), $key = 'id')
 {
     // Check specific edit permission then general edit permission.
     return JFactory::getUser()->authorise('core.edit', 'com_jtrinitycore.powerleveling.' . ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key);
 }
开发者ID:Jougito,项目名称:DynWeb,代码行数:14,代码来源:powerleveling.php

示例4: allowEdit

 protected function allowEdit($data = array(), $key = 'id')
 {
     return JFactory::getUser()->authorise('core.edit', 'com_ganalytics.profile.' . ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key);
 }
开发者ID:jmangarret,项目名称:webtuagencia24,代码行数:4,代码来源:profile.php


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