/**
  * Die dazu das aktuelle item für eine Detailseite zu holen bzw dieses zurückzusetzen.
  * Dazu muss den Linker einfach folgendes für den action namen liefern: "show" + den eigentlichen key.
  * 
  * Dann brauch man in der Detailansicht noch einen Button nach folgendem Schema:
  * $markerArray['###NEWSEARCHBTN###'] = $formTool->createSubmit('showHowTo[clear]', '###LABEL_BUTTON_BACK###'); 
  * 
  * @param string $key
  * @param tx_rnbase_mod_IModule $module
  * 
  * @return tx_rnbase_model_base
  */
 public static function getCurrentItem($key, tx_rnbase_mod_IModule $module)
 {
     $itemid = 0;
     $data = t3lib_div::_GP('show' . $key);
     if ($data) {
         list($itemid, ) = each($data);
     }
     $dataKey = 'current' . $key;
     if ($itemid === 'clear') {
         $data = t3lib_BEfunc::getModuleData(array($dataKey => ''), array($dataKey => '0'), $module->getName());
         return false;
     }
     // Daten mit Modul abgleichen
     $changed = $itemid ? array($dataKey => $itemid) : array();
     $data = t3lib_BEfunc::getModuleData(array($dataKey => ''), $changed, $module->getName());
     $itemid = $data[$dataKey];
     if (!$itemid) {
         return false;
     }
     $modelData = explode('|', $itemid);
     $item = tx_rnbase::makeInstance($modelData[0], $modelData[1]);
     if (!$item->isValid()) {
         $item = null;
         //auf null setzen damit die Suche wieder angezeigt wird
     }
     return $item;
 }
 /**
  * Returns all data for a module for current BE user.
  * @param tx_rnbase_mod_IModule $mod
  * @param	string $type If type is 'ses' then the data is stored as session-lasting data. This means that it'll be wiped out the next time the user logs in.
  */
 public static function getUserData(tx_rnbase_mod_IModule $mod, $type = '')
 {
     $settings = $GLOBALS['BE_USER']->getModuleData($mod->getName(), $type);
     return $settings;
 }
 /**
  *
  * @param tx_rnbase_mod_IModule $mod
  */
 public function getCurrentUid(tx_rnbase_mod_IModule $mod)
 {
     $modSettings = array($this->identifier => '0');
     $params = t3lib_div::_GP('showDetails');
     $params = is_array($params) ? $params : array();
     list($model, $uid) = each($params);
     if (is_array($uid)) {
         list($uid, ) = each($uid);
     }
     if (!empty($uid) && $uid === 'clear') {
         t3lib_BEfunc::getModuleData($modSettings, $modSettings, $mod->getName());
         return 0;
     }
     // else
     $uid = intval($uid);
     $data = t3lib_BEfunc::getModuleData($modSettings, $uid ? array($this->identifier => $uid) : array(), $mod->getName());
     return intval($data[$this->identifier]);
 }