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


PHP SecurityGroup::get_list方法代码示例

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


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

示例1: confirm_massassign

    function mass_assign($event, $arguments)
    {
        $action = $_REQUEST['action'];
        $module = $_REQUEST['module'];
        $no_mass_assign_list = array("Emails" => "Emails", "ACLRoles" => "ACLRoles");
        //,"Users"=>"Users");
        //check if security suite enabled
        $action = strtolower($action);
        if (isset($module) && ($action == "list" || $action == "index" || $action == "listview") && (!isset($_REQUEST['search_form_only']) || $_REQUEST['search_form_only'] != true) && !array_key_exists($module, $no_mass_assign_list)) {
            global $current_user;
            if (is_admin($current_user) || ACLAction::getUserAccessLevel($current_user->id, "SecurityGroups", 'access') == ACL_ALLOW_ENABLED) {
                require_once 'modules/SecurityGroups/SecurityGroup.php';
                $groupFocus = new SecurityGroup();
                $security_modules = $groupFocus->getSecurityModules();
                //if(in_array($module,$security_modules)) {
                if (in_array($module, array_keys($security_modules))) {
                    global $app_strings;
                    global $current_language;
                    $current_module_strings = return_module_language($current_language, 'SecurityGroups');
                    $form_header = get_form_header($current_module_strings['LBL_MASS_ASSIGN'], '', false);
                    $groups = $groupFocus->get_list("name", "", 0, -99, -99);
                    $options = array("" => "");
                    foreach ($groups['list'] as $group) {
                        $options[$group->id] = $group->name;
                    }
                    $group_options = get_select_options_with_id($options, "");
                    $mass_assign = <<<EOQ

<script type="text/javascript" language="javascript">
function confirm_massassign(del,start_string, end_string) {
\tif (del == 1) {
\t\treturn confirm( start_string + sugarListView.get_num_selected()  + end_string);
\t}
\telse {
\t\treturn confirm( start_string + sugarListView.get_num_selected()  + end_string);
\t}
}

function send_massassign(mode, no_record_txt, start_string, end_string, del) {

\tif(!sugarListView.confirm_action(del, start_string, end_string))
\t\treturn false;

\tif(document.MassAssign_SecurityGroups.massassign_group.selectedIndex == 0) {
\t\talert("Please select a group and try again.");
\t\treturn false;\t
\t}
\t 
\tif (document.MassUpdate.select_entire_list &&
\t\tdocument.MassUpdate.select_entire_list.value == 1)
\t\tmode = 'entire';
\telse if (document.MassUpdate.massall.checked == true)
\t\tmode = 'page';
\telse
\t\tmode = 'selected';

\tvar ar = new Array();
\tif(del == 1) {
\t\tvar deleteInput = document.createElement('input');
\t\tdeleteInput.name = 'Delete';
\t\tdeleteInput.type = 'hidden';
\t\tdeleteInput.value = true;
\t\tdocument.MassAssign_SecurityGroups.appendChild(deleteInput);
\t}

\tswitch(mode) {
\t\tcase 'page':
\t\t\tdocument.MassAssign_SecurityGroups.uid.value = '';
\t\t\tfor(wp = 0; wp < document.MassUpdate.elements.length; wp++) {
\t\t\t\tif(typeof document.MassUpdate.elements[wp].name != 'undefined'
\t\t\t\t\t&& document.MassUpdate.elements[wp].name == 'mass[]' && document.MassUpdate.elements[wp].checked) {
\t\t\t\t\t\t\tar.push(document.MassUpdate.elements[wp].value);
\t\t\t\t}
\t\t\t}
\t\t\tdocument.MassAssign_SecurityGroups.uid.value = ar.join(',');
\t\t\tif(document.MassAssign_SecurityGroups.uid.value == '') {
\t\t\t\talert(no_record_txt);
\t\t\t\treturn false;
\t\t\t}
\t\t\tbreak;
\t\tcase 'selected':
\t\t\tfor(wp = 0; wp < document.MassUpdate.elements.length; wp++) {
\t\t\t\tif(typeof document.MassUpdate.elements[wp].name != 'undefined'
\t\t\t\t\t&& document.MassUpdate.elements[wp].name == 'mass[]'
\t\t\t\t\t\t&& document.MassUpdate.elements[wp].checked) {
\t\t\t\t\t\t\tar.push(document.MassUpdate.elements[wp].value);
\t\t\t\t}
\t\t\t}
\t\t\tif(document.MassAssign_SecurityGroups.uid.value != '') document.MassAssign_SecurityGroups.uid.value += ',';
\t\t\tdocument.MassAssign_SecurityGroups.uid.value += ar.join(',');
\t\t\tif(document.MassAssign_SecurityGroups.uid.value == '') {
\t\t\t\talert(no_record_txt);
\t\t\t\treturn false;
\t\t\t}
\t\t\tbreak;
\t\tcase 'entire':
\t\t\tvar entireInput = document.createElement('input');
\t\t\tentireInput.name = 'entire';
\t\t\tentireInput.type = 'hidden';
\t\t\tentireInput.value = 'index';
//.........这里部分代码省略.........
开发者ID:isrealconsulting,项目名称:ic-suite,代码行数:101,代码来源:AssignGroups.php

示例2: SecurityGroup

$xtpl->assign('securitysuite_inherit_parent', $securitysuite_inherit_parent);
// securitysuite_inherit_assigned
$securitysuite_inherit_assigned = '';
if (isset($sugar_config['securitysuite_inherit_assigned']) && $sugar_config['securitysuite_inherit_assigned'] == true) {
    $securitysuite_inherit_assigned = 'CHECKED';
}
$xtpl->assign('securitysuite_inherit_assigned', $securitysuite_inherit_assigned);
//default security groups
$groupFocus = new SecurityGroup();
$defaultGroups = $groupFocus->retrieveDefaultGroups();
$defaultGroup_string = "";
foreach ($defaultGroups as $default_id => $defaultGroup) {
    $defaultGroup_string .= "\n\t<tr>\n\t<td class='dataLabel' width='30%'>\n\t\t" . $mod_strings['LBL_GROUP'] . " " . $defaultGroup['group'] . "\n\t</td>\n\t<td class='dataField' width='30%'>\n\t\t" . $mod_strings['LBL_MODULE'] . " " . $defaultGroup['module'] . "\n\t</td>\n\t<td class='dataLabel' width='40%'>\n\t\t<input type='submit' tabindex='1' class='button' onclick=\"this.form.remove_default_id.value='" . $default_id . "'; this.form.action.value='SaveConfig'; this.form.return_module.value='SecurityGroups'; this.form.return_action.value='config';\" value='" . $mod_strings['LBL_REMOVE_BUTTON_LABEL'] . "'/>\n\t</td>\n\t</tr>";
}
$xtpl->assign("DEFAULT_GROUPS", $defaultGroup_string);
$groups = $groupFocus->get_list("name");
$options = array("" => "");
foreach ($groups['list'] as $group) {
    $options[$group->id] = $group->name;
}
$xtpl->assign("SECURITY_GROUP_OPTIONS", get_select_options_with_id($options, ""));
//$moduleList = $app_list_strings['moduleList'];
//require_once('modules/Studio/DropDowns/DropDownHelper.php');
//$dh = new DropDownHelper();
//$dh->getDropDownModules();
//$moduleList = array_keys($dh->modules);
$security_modules = $groupFocus->getSecurityModules();
$security_modules["All"] = $mod_strings["LBL_ALL_MODULES"];
//rost fix
ksort($security_modules);
$xtpl->assign("MODULE_OPTIONS", get_select_options_with_id($security_modules, "All"));
开发者ID:isrealconsulting,项目名称:ic-suite,代码行数:31,代码来源:config.php

示例3: display

 function display()
 {
     $this->fromModuleBuilder = isset($_REQUEST['MB']) || !empty($_REQUEST['view_package']) && $_REQUEST['view_package'] != 'studio';
     if ($this->fromModuleBuilder) {
         return;
         //no support for MB
     }
     global $current_user;
     global $mod_strings;
     $smarty = new Sugar_Smarty();
     $smarty->assign('title', $mod_strings['LBL_DEVELOPER_TOOLS']);
     $smarty->assign('question', $mod_strings['LBL_QUESTION_ADD_LAYOUT']);
     $smarty->assign('mod_strings', $mod_strings);
     $module_name = $_REQUEST['view_module'];
     //$securitygroups = array ( "Support" => "Support" , "Sales" => "Sales" ) ;
     //$copy_layouts = array ( "Default" => "Default", "Support" => "Support" , "Sales" => "Sales" ) ;
     //get security groups that do not have a layout for this module yet
     require_once 'modules/SecurityGroups/SecurityGroup.php';
     $securitygroups = array();
     $copy_layouts = array("Default" => translate('LBL_DEFAULT', 'ModuleBuilder'));
     $groupFocus = new SecurityGroup();
     $groups = $groupFocus->get_list("name", "", 0, 0, 999);
     $custDirectory = "custom/modules/" . $module_name . "/metadata/";
     foreach ($groups['list'] as $group) {
         if (is_dir($custDirectory . $group->id)) {
             $copy_layouts[$group->id] = $group->name;
         } else {
             $securitygroups[$group->id] = $group->name;
         }
     }
     if (empty($securitygroups)) {
         $securitygroups["-1"] = "[Create a Group First]";
     }
     /**
      
              // assign fields and layout
              $smarty->assign ( 'available_fields', $parser->getAvailableFields () ) ;
              $smarty->assign ( 'layout', $parser->getLayout () ) ;
              $smarty->assign ( 'view_module', $this->editModule ) ;
              $smarty->assign ( 'view', $this->editLayout ) ;
              $smarty->assign ( 'maxColumns', $parser->getMaxColumns() ) ;
              $smarty->assign ( 'nextPanelId', $parser->getFirstNewPanelId() ) ;
              $smarty->assign ( 'fieldwidth', '150px' ) ;
             $smarty->assign ( 'translate', true ) ;
     */
     //$this->smarty->assign ( 'view_module', $_REQUEST['view_module'] ) ;
     //$this->smarty->assign ( 'rel', $relationship->getDefinition () ) ;
     //$this->smarty->assign ( 'mod_strings', $GLOBALS [ 'mod_strings' ] ) ;
     //$this->smarty->assign ( 'module_key', $relationship->lhs_module ) ;
     $smarty->assign('securitygroups', array_keys($securitygroups));
     $smarty->assign('translated_securitygroups', $securitygroups);
     $smarty->assign('copy_layouts', array_keys($copy_layouts));
     $smarty->assign('translated_copy_layouts', $copy_layouts);
     $smarty->assign('view_module', $module_name);
     // set up language files
     //$smarty->assign ( 'language', $parser->getLanguage() ) ; // for sugar_translate in the smarty template
     //$smarty->assign('from_mb',$this->fromModuleBuilder);
     $mb = new ModuleBuilder();
     if (!isset($_REQUEST['view_package'])) {
         $_REQUEST['view_package'] = 'studio';
     }
     $module =& $mb->getPackageModule($_REQUEST['view_package'], $_REQUEST['view_module']);
     $package = $mb->packages[$_REQUEST['view_package']];
     $package->loadModuleTitles();
     $ajax = new AjaxCompose();
     $ajax->addCrumb(translate('LBL_STUDIO', 'ModuleBuilder'), 'ModuleBuilder.main("studio")');
     $ajax->addCrumb(translate($module_name), 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard&view_module=' . $module_name . '")');
     $ajax->addCrumb(translate('LBL_LAYOUTS', 'ModuleBuilder'), 'ModuleBuilder.getContent("module=ModuleBuilder&action=addlayout&layouts=1&view_module=' . $module_name . '")');
     $ajax->addCrumb($mod_strings['LBL_ADD_LAYOUT'], '');
     //$ajax->addSection ( 'center', $moduleName . ' ' . translate('LBL_ADD_LAYOUT'),
     $ajax->addSection('center', $mod_strings['LBL_ADD_LAYOUT'], $smarty->fetch('modules/ModuleBuilder/tpls/addlayout.tpl'));
     echo $ajax->getJavascript();
 }
开发者ID:sysraj86,项目名称:carnivalcrm,代码行数:73,代码来源:view.addlayout.php


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