コード例 #1
0
ファイル: StudioModule.php プロジェクト: sysraj86/carnivalcrm
 /**
  * Gets a list of subpanels used by the current module
  */
 function getSubpanels()
 {
     if (!empty($GLOBALS['current_user']) && empty($GLOBALS['modListHeader'])) {
         $GLOBALS['modListHeader'] = query_module_access_list($GLOBALS['current_user']);
     }
     require_once 'include/SubPanel/SubPanel.php';
     $nodes = array();
     $GLOBALS['log']->debug("StudioModule->getSubpanels(): getting subpanels for " . $this->module);
     foreach (SubPanel::getModuleSubpanels($this->module) as $name => $label) {
         if ($name == 'users') {
             continue;
         }
         $subname = sugar_ucfirst(!empty($label) ? translate($label, $this->module) : $name);
         $nodes[$subname] = array('name' => $name, 'label' => $subname, 'action' => "module=ModuleBuilder&action=editLayout&view=ListView&view_module={$this->module}&subpanel={$name}&subpanelLabel={$subname}", 'imageTitle' => $subname, 'imageName' => 'icon_' . ucfirst($name) . '_32', 'altImageName' => 'Subpanels', 'size' => '48');
     }
     return $nodes;
 }
コード例 #2
0
 /**
  * Gets a list of subpanels used by the current module
  */
 function getSubpanels()
 {
     if (!empty($GLOBALS['current_user']) && empty($GLOBALS['modListHeader'])) {
         $GLOBALS['modListHeader'] = query_module_access_list($GLOBALS['current_user']);
     }
     require_once 'include/SubPanel/SubPanel.php';
     $nodes = array();
     $GLOBALS['log']->debug("StudioModule->getSubpanels(): getting subpanels for " . $this->module);
     // counter to add a unique key to assoc array below
     $ct = 0;
     foreach (SubPanel::getModuleSubpanels($this->module) as $name => $label) {
         if ($name == 'users') {
             continue;
         }
         $subname = sugar_ucfirst(!empty($label) ? translate($label, $this->module) : $name);
         $action = "module=ModuleBuilder&action=editLayout&view=ListView&view_module={$this->module}&subpanel={$name}&subpanelLabel=" . urlencode($subname);
         //  bug47452 - adding a unique number to the $nodes[ key ] so if you have 2+ panels
         //  with the same subname they will not cancel each other out
         $nodes[$subname . $ct++] = array('name' => $name, 'label' => $subname, 'action' => $action, 'imageTitle' => $subname, 'imageName' => 'icon_' . ucfirst($name) . '_32', 'altImageName' => 'Subpanels', 'size' => '48');
     }
     return $nodes;
 }
コード例 #3
0
ファイル: MiscUtilsTest.php プロジェクト: jgera/sugarcrm_dev
 public function testSugarUcfirst()
 {
     $this->assertEquals('John', sugar_ucfirst('John'));
 }