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


PHP JModelAdmin::canEditState方法代码示例

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


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

示例1: canEditState

 /**
  * Method to test whether a record can be deleted.
  *
  * @param   object  $record  A record object.
  *
  * @return  boolean  True if allowed to change the state of the record. Defaults to the permission for the component.
  *
  * @since   1.6
  */
 protected function canEditState($record)
 {
     if (!empty($record->catid)) {
         return JFactory::getUser()->authorise('core.edit.state', 'com_htraininglogs.category.' . (int) $record->catid);
     }
     return parent::canEditState($record);
 }
开发者ID:hogeh,项目名称:htraininglogs,代码行数:16,代码来源:htraininglog.php

示例2: canEditState

 /**
  * Method to test whether a record can be deleted.
  *
  * @param   object  $record  A record object.
  *
  * @return  boolean  True if allowed to change the state of the record. Defaults to the permission for the component.
  *
  * @since   1.0.0
  */
 protected function canEditState($record)
 {
     if (!empty($record->catid)) {
         return JFactory::getUser()->authorise('core.edit.state', 'com_digicom.discount.' . (int) $record->catid);
     }
     return parent::canEditState($record);
 }
开发者ID:Shtier,项目名称:digicom,代码行数:16,代码来源:discount.php

示例3: canEditState

 /**
  * Method to test whether a record can have its state edited.
  *
  * @param	object	A record object.
  *
  * @return	boolean	True if allowed to change the state of the record. Defaults to the permission set in the component.
  * @since	1.6
  */
 protected function canEditState($record)
 {
     if (!empty($record->id)) {
         return User::authorise('core.edit.state', 'com_menus.item.' . (int) $record->id);
     } else {
         return parent::canEditState($record);
     }
 }
开发者ID:mined-gatech,项目名称:hubzero-cms,代码行数:16,代码来源:item.php

示例4: canEditState

 /**
  * Method to test whether a record can have its state edited.
  *
  * @param   object  $record  A record object.
  *
  * @return  boolean  True if allowed to change the state of the record. Defaults to the permission set in the component.
  *
  * @since   1.6
  */
 protected function canEditState($record)
 {
     $permissions = SibdietHelper::getUserPermissions();
     if (in_array('contags', $permissions)) {
         return parent::canEditState($record);
     }
     return false;
 }
开发者ID:smhnaji,项目名称:sdnet,代码行数:17,代码来源:contag.php

示例5: canEditState

 protected function canEditState($record)
 {
     $user = JFactory::getUser();
     if ($record->imgid) {
         return $user->authorise('core.edit.state', 'com_phocagallery.phocagallerycoimg.' . (int) $record->imgid);
     } else {
         return parent::canEditState($record);
     }
 }
开发者ID:naka211,项目名称:malerfirmaet,代码行数:9,代码来源:phocagallerycoimg.php

示例6: canEditState

 protected function canEditState($record)
 {
     $user = JFactory::getUser();
     if (!empty($record->id)) {
         return $user->authorise('core.edit.state', 'com_bt_socialconnect.widget.' . (int) $record->id);
     } else {
         return parent::canEditState('com_bt_socialconnect');
     }
 }
开发者ID:juanferden,项目名称:adoperp,代码行数:9,代码来源:widget.php

示例7: canEditState

 /**
  * Method to test whether a record can be deleted.
  *
  * @param   object  $record  A record object.
  *
  * @return  boolean  True if allowed to change the state of the record. Defaults to the permission for the component.
  *
  * @since   1.6
  */
 protected function canEditState($record)
 {
     $user = JFactory::getUser();
     if (!empty($record->id)) {
         return $user->authorise('core.edit.state', 'com_azurapagebuilder.page.' . (int) $record->id);
     } else {
         return parent::canEditState($record);
     }
 }
开发者ID:sankam-nikolya,项目名称:lptt,代码行数:18,代码来源:page.php

示例8: canEditState

 protected function canEditState($record)
 {
     $user = JFactory::getUser();
     /*if (!empty($record->catid)) {
     			return $user->authorise('core.edit.state', 'com_phocagallery.phocagalleryuser');
     		} else {*/
     return parent::canEditState($record);
     //}
 }
开发者ID:scarsroga,项目名称:blog-soa,代码行数:9,代码来源:phocagalleryuser.php

示例9: canEditState

 /**
  * Method to test whether a record can have its state changed.
  *
  * @param	object	A record object.
  * @return	boolean	True if allowed to change the state of the record. Defaults to the permission set in the component.
  * @since	1.6
  */
 protected function canEditState($record)
 {
     $user = JFactory::getUser();
     if (!empty($record->catid)) {
         return $user->authorise('core.edit.state', 'com_faqs.category.' . (int) $record->catid);
     } else {
         return parent::canEditState($record);
     }
 }
开发者ID:bubujie,项目名称:xixia,代码行数:16,代码来源:faq.php

示例10: canEditState

 /**
  * Method to test whether a record can have its state changed.
  *
  * @param   object  $record  A record object.
  *
  * @return  boolean  True if allowed to change the state of the record. Defaults to the permission set in the component.
  *
  * @since   1.6
  */
 protected function canEditState($record)
 {
     $user = JFactory::getUser();
     // Check against the category.
     if (!empty($record->catid)) {
         return $user->authorise('core.edit.state', 'com_jnt_hanhphuc.category.' . (int) $record->catid);
     } else {
         return parent::canEditState($record);
     }
 }
开发者ID:ngxuanmui,项目名称:hp3,代码行数:19,代码来源:album.php

示例11: canEditState

 protected function canEditState($record)
 {
     $user = JFactory::getUser();
     if (!empty($record->id)) {
         return $user->authorise('core.edit.state', 'com_judirectory.field.' . $record->id);
     } elseif (!empty($record->group_id)) {
         return $user->authorise('core.edit.state', 'com_judirectory.fieldgroup.' . (int) $record->group_id);
     } else {
         return parent::canEditState($record);
     }
 }
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:11,代码来源:field.php

示例12: canEditState

 /**
  * Method to test whether a record can be deleted.
  *
  * @param JForm $record a record object.
  * @return boolean True if allowed to change the state of the record. Defaults to the permission set in the component.
  */
 protected function canEditState($record)
 {
     if (!empty($record)) {
         if ($record instanceof JForm) {
             return JoomDOCAccessDocument::editState($record->getValue('id'), $record->getValue('checked_out'), $record->getValue('path'));
         } else {
             return JoomDOCAccessDocument::editState($record->id, $record->checked_out, $record->path);
         }
     }
     return parent::canEditState($record);
 }
开发者ID:abdullah929,项目名称:bulletin,代码行数:17,代码来源:document.php

示例13: canEditState

 /**
  * Method to test whether a record state can be changed.
  *
  * @param   object  $record  A record object.
  *
  * @return  boolean  True if allowed to change the state of the record. Defaults to the permission for the component.
  *
  * @since   11.1
  */
 protected function canEditState($record)
 {
     $user = JFactory::getUser();
     $fid = JFactory::getApplication()->input->getInt('fid', -1);
     // Check form settings.
     if ($fid != -1) {
         return $user->authorise('core.edit.state', 'com_visforms.visform.' . (int) $fid);
     } else {
         return parent::canEditState($record);
     }
 }
开发者ID:shamusdougan,项目名称:GDMCWebsite,代码行数:20,代码来源:visdata.php

示例14: canEditState

 /**
  * Method to test whether a record can be deleted.
  *
  * @param	object	$record	A record object.
  *
  * @return	boolean	True if allowed to change the state of the record. Defaults to the permission set in the component.
  * @since	1.6
  */
 protected function canEditState($record)
 {
     $user = JFactory::getUser();
     // Check for existing article.
     if (!empty($record->id)) {
         return $user->authorise('core.edit.state', 'com_content.article.' . (int) $record->id);
     } else {
         if (!empty($record->catid)) {
             return $user->authorise('core.edit.state', 'com_content.category.' . (int) $record->catid);
         } else {
             return parent::canEditState($record);
         }
     }
 }
开发者ID:Joomla-on-NoSQL,项目名称:LaMojo,代码行数:22,代码来源:article.php

示例15: canEditState

 /**
  * Method to test whether a record can have its state changed.
  *
  * @param
  *        	object A record object.
  * @return boolean True if allowed to change the state of the record. Defaults to the permission set in the component.
  * @since 1.6
  */
 protected function canEditState($record)
 {
     $user = JFactory::getUser();
     if (!empty($record->catid)) {
         $canEditState = $user->authorise('core.edit.state', 'com_edashboard.category.' . (int) $record->catid);
     } else {
         $canEditState = parent::canEditState($record);
     }
     // ABP: Additional check on pub dates: deny if published, only superadmin can change
     if ($canEditState && !$user->authorise('core.admin') && $record->id) {
         $item = $this->getItem($record->id);
         $canEditState = !$this->isPublished($item);
     }
     return $canEditState;
 }
开发者ID:site4com,项目名称:acts,代码行数:23,代码来源:post.php


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