Exemple #1
0
 /**
  * Show function menu.
  *
  * @param int $pid
  * @param string $name name of menu
  * @param string $modName name of be module
  * @param array $entries menu entries
  * @param string $script The script to send the &id to, if empty it's automatically found
  * @param string $addParams Additional parameters to pass to the script.
  * @return array with keys 'menu' and 'value'
  */
 public static function showMenu($pid, $name, $modName, $entries, $script = '', $addparams = '')
 {
     $MENU = array($name => $entries);
     $SETTINGS = Tx_Rnbase_Backend_Utility::getModuleData($MENU, tx_rnbase_parameters::getPostOrGetParameter('SET'), $modName);
     $ret['menu'] = tx_rnbase_util_TYPO3::isTYPO62OrHigher() && is_array($MENU[$name]) && count($MENU[$name]) == 1 ? self::buildDummyMenu('SET[' . $name . ']', $MENU[$name]) : Tx_Rnbase_Backend_Utility::getFuncMenu($pid, 'SET[' . $name . ']', $SETTINGS[$name], $MENU[$name], $script, $addparams);
     $ret['value'] = $SETTINGS[$name];
     return $ret;
 }
 /**
  * Gibt einen selector mit den elementen im gegebenen array zurück
  *
  * @TODO: move to an selector!
  *
  * @param array $aItems Array mit den werten der Auswahlbox
  * @param mixed $selectedItem
  * @param string $sDefId ID-String des Elements
  * @param array $aData enthält die Formularelement für die Ausgabe im Screen. Keys: selector, label
  * @param array $aOptions zusätzliche Optionen: label, id
  * @return string selected item
  */
 public static function showSelectorByArray($aItems, $selectedItem, $sDefId, &$aData, $aOptions = array())
 {
     $id = isset($aOptions['id']) && $aOptions['id'] ? $aOptions['id'] : $sDefId;
     $pid = isset($aOptions['pid']) && $aOptions['pid'] ? $aOptions['pid'] : 0;
     // Build select box items
     $aData['selector'] = Tx_Rnbase_Backend_Utility::getFuncMenu($pid, 'SET[' . $id . ']', $selectedItem, $aItems);
     //label
     $aData['label'] = $aOptions['label'];
     // as the deleted fe users have always to be hidden the function returns always FALSE
     //@todo wozu die alte abfrage? return $defId==$id ? FALSE : $selectedItem;
     return $selectedItem;
 }
 /**
  * Returns the complete search form
  *
  * @return 	string
  */
 public function getSearchFormData()
 {
     $data = parent::getSearchFormData();
     $button = $data['updatebutton'];
     unset($data['updatebutton']);
     $filter = $this->getFilter();
     $data['runid'] = array('field' => \Tx_Rnbase_Backend_Utility::getFuncMenu($this->getOptions()->getPid(), 'SET[' . $this->getListerId() . 'Runid]', $filter->getRunid(), $this->getLatestRuns()), 'label' => '###LABEL_FILTER_RUNID###');
     $data['severity'] = array('field' => \Tx_Rnbase_Backend_Utility::getFuncMenu($this->getOptions()->getPid(), 'SET[' . $this->getListerId() . 'Severity]', $filter->getSeverity(), $this->getSeverityLevels()), 'label' => '###LABEL_FILTER_SEVERITY###');
     $data['extkeys'] = array('field' => \Tx_Rnbase_Backend_Utility::getFuncMenu($this->getOptions()->getPid(), 'SET[' . $this->getListerId() . 'ExtKey]', $filter->getExtKey(), $this->getLoggedExtensions()), 'label' => '###LABEL_FILTER_EXTKEYS###');
     $data['updatebutton'] = $button;
     return $data;
 }