本文整理汇总了PHP中TabController::set_users_can_edit方法的典型用法代码示例。如果您正苦于以下问题:PHP TabController::set_users_can_edit方法的具体用法?PHP TabController::set_users_can_edit怎么用?PHP TabController::set_users_can_edit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TabController
的用法示例。
在下文中一共展示了TabController::set_users_can_edit方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: action_savetabs
public function action_savetabs()
{
require_once 'include/SubPanel/SubPanelDefinitions.php';
require_once 'modules/MySettings/TabController.php';
global $current_user, $app_strings;
if (!is_admin($current_user)) {
sugar_die($app_strings['ERR_NOT_ADMIN']);
}
// handle the tabs listing
$toDecode = html_entity_decode($_REQUEST['enabled_tabs'], ENT_QUOTES);
$enabled_tabs = json_decode($toDecode);
$tabs = new TabController();
$tabs->set_system_tabs($enabled_tabs);
$tabs->set_users_can_edit(isset($_REQUEST['user_edit_tabs']) && $_REQUEST['user_edit_tabs'] == 1);
// handle the subpanels
if (isset($_REQUEST['disabled_tabs'])) {
$disabledTabs = json_decode(html_entity_decode($_REQUEST['disabled_tabs'], ENT_QUOTES));
$disabledTabsKeyArray = TabController::get_key_array($disabledTabs);
SubPanelDefinitions::set_hidden_subpanels($disabledTabsKeyArray);
}
header("Location: index.php?module=Administration&action=ConfigureTabs");
}
示例2: action_savetabs
public function action_savetabs()
{
require_once 'include/SubPanel/SubPanelDefinitions.php';
require_once 'modules/MySettings/TabController.php';
global $current_user, $app_strings, $modInvisList;
if (!is_admin($current_user)) {
sugar_die($app_strings['ERR_NOT_ADMIN']);
}
// handle the tabs listing
$toDecode = html_entity_decode($_REQUEST['enabled_tabs'], ENT_QUOTES);
$enabled_tabs = json_decode($toDecode);
// Add Home back in so that it always appears first in Sugar 7
array_unshift($enabled_tabs, 'Home');
$tabs = new TabController();
$tabs->set_system_tabs($enabled_tabs);
$tabs->setPortalTabs(array_values(array_intersect($enabled_tabs, $tabs->getAllPortalTabs())));
$tabs->set_users_can_edit(isset($_REQUEST['user_edit_tabs']) && $_REQUEST['user_edit_tabs'] == 1);
// handle the subpanels
if (isset($_REQUEST['disabled_tabs'])) {
$disabledTabs = json_decode(html_entity_decode($_REQUEST['disabled_tabs'], ENT_QUOTES));
$disabledTabsKeyArray = TabController::get_key_array($disabledTabs);
//Never show Project subpanels if Project module is hidden
if (!in_array('project', $disabledTabsKeyArray) && in_array('Project', $modInvisList)) {
$disabledTabsKeyArray[] = 'project';
}
// if RLI is hidden, always hide the RLI subpanel.
if (!in_array('revenuelineitems', $disabledTabsKeyArray) && in_array('RevenueLineItems', $modInvisList)) {
$disabledTabsKeyArray[] = 'revenuelineitems';
}
SubPanelDefinitions::set_hidden_subpanels($disabledTabsKeyArray);
}
// Only rebuild the relevent metadata sections.
MetaDataManager::refreshSectionCache(MetaDataManager::MM_MODULESINFO, array('base'));
MetaDataManager::refreshSectionCache(MetaDataManager::MM_HIDDENSUBPANELS, array('base'));
if (!headers_sent()) {
header("Location: index.php?module=Administration&action=ConfigureTabs");
}
}
示例3: TabController
* for the specific language governing rights and limitations under the
* License.
*
* All copies of the Covered Code must include on each user interface screen:
* (i) the "Powered by SugarCRM" logo and
* (ii) the SugarCRM copyright notice
* in the same form as they appear in the distribution. See full license for
* requirements.
*
* The Original Code is: SugarCRM Open Source
* The Initial Developer of the Original Code is SugarCRM, Inc.
* Portions created by SugarCRM are Copyright (C) 2004-2006 SugarCRM, Inc.;
* All Rights Reserved.
* Contributor(s): ______________________________________.
********************************************************************************/
/*********************************************************************************
* Description: TODO: To be written.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
* All Rights Reserved.
* Contributor(s): ______________________________________..
********************************************************************************/
require_once "modules/Administration/Administration.php";
global $current_user;
if (!is_admin($current_user)) {
sugar_die("Unauthorized access to administration.");
}
require_once 'modules/MySettings/TabController.php';
$tabs = new TabController();
$tabs->set_system_tabs($_POST['group_0']);
$tabs->set_users_can_edit(isset($_REQUEST['user_edit_tabs']) && $_REQUEST['user_edit_tabs'] == 1);
header("Location: index.php?action=index&module=Administration");