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


PHP TBGSettings::getDefaultGroupIDs方法代码示例

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


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

示例1: runDeleteGroup

 public function runDeleteGroup(TBGRequest $request)
 {
     try {
         if (!!in_array($request->getParameter('group_id'), TBGSettings::getDefaultGroupIDs())) {
             throw new Exception(TBGContext::getI18n()->__("You cannot delete the default groups"));
         }
         try {
             $group = TBGContext::factory()->TBGGroup($request->getParameter('group_id'));
         } catch (Exception $e) {
         }
         if (!$group instanceof TBGGroup) {
             throw new Exception(TBGContext::getI18n()->__("You cannot delete this group"));
         }
         $group->delete();
         return $this->renderJSON(array('success' => true, 'message' => TBGContext::getI18n()->__('The group was deleted')));
     } catch (Exception $e) {
         $this->getResponse()->setHttpStatus(400);
         return $this->renderJSON(array('failed' => true, 'error' => $e->getMessage()));
     }
 }
开发者ID:ronaldbroens,项目名称:thebuggenie,代码行数:20,代码来源:actions.class.php

示例2: javascript_link_tag

					<?php 
} else {
    ?>
						<?php 
    echo javascript_link_tag(__('List users in this group'), array('onclick' => 'TBG.Config.Group.showMembers(\'' . make_url('configure_users_get_group_members', array('group_id' => $group->getID())) . '\', ' . $group->getID() . ');'));
    ?>
					<?php 
}
?>
				</li>
				<li><?php 
echo javascript_link_tag(__('Clone this user group'), array('onclick' => '$(\'clone_group_' . $group->getID() . '\').toggle();'));
?>
</li>
				<?php 
if (!in_array($group->getID(), TBGSettings::getDefaultGroupIDs()) && !$group->isDefaultUserGroup()) {
    ?>
					<li><?php 
    echo javascript_link_tag(__('Delete this user group'), array('onclick' => "TBG.Main.Helpers.Dialog.show('" . __('Do you really want to delete this group?') . "', '" . __('If you delete this group, then all users in this group will be disabled until moved to a different group') . "', {yes: {click: function() {TBG.Config.Group.remove('" . make_url('configure_users_delete_group', array('group_id' => $group->getID())) . "', {$group->getID()}); }}, no: { click: TBG.Main.Helpers.Dialog.dismiss }});"));
    ?>
</li>
				<?php 
} else {
    ?>
					<li class="disabled" title="<?php 
    echo __('The default group cannot be deleted');
    ?>
"><a href="javascript:void(0);"><?php 
    echo __('Delete this user group');
    ?>
</a></li>
开发者ID:oparoz,项目名称:thebuggenie,代码行数:31,代码来源:_groupbox.inc.php


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