/** * Function executed from the Scheduler. * Sends an email * * @return boolean */ public function execute() { $success = TRUE; $taskId = $this->taskUid; tx_rnbase::load('tx_rnbase_util_Misc'); try { $lastRun = $this->getLastRunTime($taskId); /* @var $srv tx_mklog_srv_WatchDog */ $srv = tx_rnbase_util_Misc::getService('mklog', 'WatchDog'); $filters = array(); $options = array(); $options['minimalSeverity'] = $this->getMinimalSeverity(); $options['forceSummaryMail'] = $this->getForceSummaryMail(); $options['includeDataVar'] = $this->getIncludeDataVar(); //damit jede Nachricht nur einmal kommt, auch wenn sie mehrmals vorhanden ist if ($this->getGroupEntries()) { $options['groupby'] = Tx_Mklog_Utility_Devlog::getMessageFieldName() . ',extkey'; // wir wollen aber wissen wie oft jede Nachricht vorhanden ist $options['count'] = TRUE; } $srv->triggerMails($this->getEmailReceiver(), $lastRun, $filters, $options); $this->updateLastRunTime($taskId); } catch (Exception $e) { tx_rnbase_util_Logger::fatal('WatchDog failed!', 'mklog', array('Exception' => $e->getMessage())); $success = FALSE; } return $success; }
/** * Interne Verarbeitung der Exception * * @param string $actionName * @param Exception $e * @param tx_rnbase_configurations $configurations * * @return string error message */ public function handleException($actionName, Exception $e, tx_rnbase_configurations $configurations) { // wir prüfen erst mal, ob die exception gefangen werden soll $catch = $this->catchException($actionName, $e, $configurations); if ($catch !== NULL) { return $catch; } // wenn nicht senden wir ggf den header if ($this->send503HeaderOnException($configurations)) { header('HTTP/1.1 503 Service Unavailable'); } // wir loggen nun den fehler tx_rnbase::load('tx_rnbase_util_Logger'); if (tx_rnbase_util_Logger::isFatalEnabled()) { $extKey = $configurations->getExtensionKey(); $extKey = $extKey ? $extKey : 'rn_base'; tx_rnbase_util_Logger::fatal('Fatal error for action ' . $actionName, $extKey, array('Exception' => array('message' => $e->getMessage(), 'code' => $e->getCode(), 'file' => $e->getFile(), 'line' => $e->getLine(), 'trace' => $e->getTraceAsString()), '_GET' => $_GET, '_POST' => $_POST)); } // wir senden eine fehlermail $addr = tx_rnbase_configurations::getExtensionCfgValue('rn_base', 'sendEmailOnException'); if ($addr) { tx_rnbase_util_Misc::sendErrorMail($addr, $actionName, $e); } // Now message for FE $ret = $this->getErrorMessage($actionName, $e, $configurations); return $ret; }
/** * @return tx_mklib_model_Currency */ public function getCurrency() { tx_rnbase::load('tx_mklib_model_Currency'); //@TODO: aktuellen Code auslesen und übergeben, // return tx_mklib_model_Currency::getByCountry(); return tx_mklib_model_Currency::getByCurrencyCode(); }
/** * Erstellt eine GoogleMap * * @param tx_rnbase_configurations $configurations * @param string $confId * @return tx_rnbase_maps_google_Map */ static function createGoogleMap(&$configurations, $confId) { $map = self::createMap('tx_rnbase_maps_google_Map', $configurations, $confId); $keys = $configurations->getKeyNames($confId . 'poi.'); if (isset($keys)) { tx_rnbase::load('tx_rnbase_maps_Util'); foreach ($keys as $key) { $poi = $configurations->get($confId . 'poi.' . $key . '.'); $poi = tx_rnbase::makeInstance('tx_rnbase_maps_POI', $poi); $bubble = tx_rnbase_maps_Util::createMapBubble($poi); if (!$bubble) { continue; } $bubble->setDescription($poi->getDescription()); // Prüfen, ob ein Icon konfiguriert ist $iconConfId = $confId . 'poi.' . $key . '.icon.'; if ($configurations->get($iconConfId)) { $icon = tx_rnbase::makeInstance('tx_rnbase_maps_google_Icon', $map); $icon = new tx_rnbase_maps_google_Icon($map); $image = $configurations->get($iconConfId . 'image', TRUE); $icon->setImage($image, $configurations->getInt($iconConfId . 'image.file.maxW'), $configurations->getInt($iconConfId . 'image.file.maxH')); $image = $configurations->get($iconConfId . 'shadow', TRUE); $icon->setShadow($image, $configurations->getInt($iconConfId . 'shadow.file.maxW'), $configurations->getInt($iconConfId . 'shadow.file.maxH')); $name = $configurations->get($iconConfId . 'name'); $icon->setName($name ? $name : tx_rnbase_util_Misc::createHash(array('name' => $image))); $bubble->setIcon($icon); } $map->addMarker($bubble); } } return $map; }
/** * Befüllt den Record Pfaden * * @param string $sPath * @return tx_mklib_model_Dam */ public function fillPath($sPath = false) { // Pathname immer setzen! if (!$this->hasFilePath()) { if (tx_rnbase_util_TYPO3::isTYPO60OrHigher()) { $this->setFilePathName($this->getUrl()); } else { $this->setFilePathName($this->getFilePath() . $this->getFileName()); } } tx_rnbase::load('tx_mklib_util_File'); // webpath setzen if ((!$sPath || $sPath == 'webpath') && !$this->hasFileWebpath()) { $this->setFileWebpath(tx_mklib_util_File::getWebPath($this->getFilePathName())); } // serverpath setzen if ((!$sPath || $sPath == 'serverpath') && !$this->hasFileServerpath()) { $this->setFileServerpath(tx_mklib_util_File::getServerPath($this->getFilePathName())); } // relpath setzen if ((!$sPath || $sPath == 'relpath') && !$this->hasFileRelpath()) { $this->setFileRelpath(tx_mklib_util_File::getRelPath($this->getFilePathName())); } return $this; }
/** * Lädt ein COnfigurations Objekt nach mit der TS aus der Extension * Dabei wird alles geholt was in "plugin.tx_$extKey", "lib.$extKey." und * "lib.links." liegt * * @param string $extKey Extension, deren TS Config geladen werden soll * @param string $extKeyTS Extension, deren Konfig innerhalb der * TS Config geladen werden soll. * Es kann also zb. das TS von mklib geladen werden aber darin die konfig für * das plugin von mkxyz * @param string $sStaticPath pfad zum TS * @param array $aConfig zusätzliche Konfig, die die default überschreibt * @param boolean $resolveReferences sollen referenzen die in lib. * und plugin.tx_$extKeyTS stehen aufgelöst werden? * @param boolean $forceTsfePreparation * @return tx_rnbase_configurations */ public static function loadConfig4BE($extKey, $extKeyTs = null, $sStaticPath = '', $aConfig = array(), $resolveReferences = false, $forceTsfePreparation = false) { $extKeyTs = is_null($extKeyTs) ? $extKey : $extKeyTs; if (!$sStaticPath) { $sStaticPath = '/static/ts/setup.txt'; } if (file_exists(t3lib_div::getFileAbsFileName('EXT:' . $extKey . $sStaticPath))) { t3lib_extMgm::addPageTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:' . $extKey . $sStaticPath . '">'); } tx_rnbase::load('tx_rnbase_configurations'); tx_rnbase::load('tx_rnbase_util_Misc'); $tsfePreparationOptions = array(); if ($forceTsfePreparation) { $tsfePreparationOptions['force'] = true; } // Ist bei Aufruf aus BE notwendig! (@TODO: sicher???) tx_rnbase_util_Misc::prepareTSFE($tsfePreparationOptions); $GLOBALS['TSFE']->config = array(); $cObj = t3lib_div::makeInstance('tslib_cObj'); $pageTsConfig = self::getPagesTSconfig(0); $tempConfig = $pageTsConfig['plugin.']['tx_' . $extKeyTs . '.']; $tempConfig['lib.'][$extKeyTs . '.'] = $pageTsConfig['lib.'][$extKeyTs . '.']; $tempConfig['lib.']['links.'] = $pageTsConfig['lib.']['links.']; if ($resolveReferences) { $GLOBALS['TSFE']->tmpl->setup['lib.'][$extKeyTs . '.'] = $tempConfig['lib.'][$extKeyTs . '.']; $GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_' . $extKeyTs . '.'] = $pageTsConfig['plugin.']['tx_' . $extKeyTs . '.']; } $pageTsConfig = $tempConfig; $qualifier = $pageTsConfig['qualifier'] ? $pageTsConfig['qualifier'] : $extKeyTs; // möglichkeit die default konfig zu überschreiben $pageTsConfig = t3lib_div::array_merge_recursive_overrule($pageTsConfig, $aConfig); $configurations = new tx_rnbase_configurations(); $configurations->init($pageTsConfig, $cObj, $extKeyTs, $qualifier); return $configurations; }
private function getModels() { $models = array(); tx_rnbase::load('tx_rnbase_model_media'); $models[] = new tx_rnbase_model_media(array('uid' => 22, 'file_name' => 'file22.jpg')); $models[] = new tx_rnbase_model_media(array('uid' => 33, 'file_name' => 'file33.jpg')); return $models; }
protected function setUp() { if (empty($GLOBALS['TCA']['tx_mklib_wordlist'])) { tx_rnbase::load('tx_mklib_srv_Wordlist'); $GLOBALS['TCA']['tx_mklib_wordlist'] = tx_mklib_srv_Wordlist::getTca(); $GLOBALS['TCA']['tx_mklib_wordlist']['test'] = TRUE; } }
/** * Liefert den Searcher * * @return tx_rnbase_util_SearchBase */ protected function getSearcher() { tx_rnbase::load('tx_rnbase_util_SearchBase'); $searcher = tx_rnbase_util_SearchBase::getInstance($this->getSearchClass()); if (!$searcher instanceof tx_rnbase_util_SearchBase) { throw new Exception(get_class($this) . '->getSearchClass() has to return a classname' . ' of class which extends tx_rnbase_util_SearchBase!'); } return $searcher; }
/** * (non-PHPdoc) * @see PHPUnit_Framework_TestCase::setUp() */ protected function setUp() { tx_rnbase::load('tx_rnbase_util_Misc'); tx_rnbase_util_Misc::prepareTSFE(array('force' => TRUE)); //tq_seo extension hat einen hook der auf das folgende feld zugreift. //wenn dieses nicht da ist bricht der test mit einer php warnung ab, was //wir verhindern wollen! $GLOBALS['TSFE']->rootLine[0]['uid'] = 1; }
/** * (non-PHPdoc) * @see PHPUnit_Framework_TestCase::setUp() */ protected function setUp() { //es kann sein dass die TCA von der wordlist nicht geladen wurde. //also stellen wir die TCA hier bereit tx_rnbase::load('tx_mklib_srv_Wordlist'); global $TCA; $TCA['tx_mklib_wordlist'] = tx_mklib_srv_Wordlist::getTca(); $this->returnUrlBackup = $_GET['returnUrl']; }
/** * Validiert einen PLZ-String für ein Land. * @param tx_mklib_interface_IZipCountry $land * @param string $zip * @return boolean */ public static function validate(tx_mklib_interface_IZipCountry $country, $zip) { $result = true; switch ($country->getZipRule()) { case 0: // no rule set $result = true; tx_rnbase::load('tx_rnbase_util_Logger'); if (tx_rnbase_util_Logger::isNoticeEnabled()) { tx_rnbase_util_Logger::notice('No zip rule for country defined.', 'mklib', array('zip' => $zip, 'getISO2' => $country->getISO2(), 'getZipLength' => $country->getZipLength(), 'getZipRule' => $country->getZipRule())); } break; case 1: // maximum length without gaps $result = self::validateMaxLengthWG($country, $zip); break; case 2: // maximum length numerical without gaps $result = self::validateMaxLengthNumWG($country, $zip); break; case 3: // exact length without gaps $result = self::validateLengthWG($country, $zip); break; case 4: // exact length numerical without gaps $result = self::validateLengthNumWG($country, $zip); break; case 5: // maximum length with gaps $result = self::validateMaxLength($country, $zip); break; case 6: // maximum length numerical with gaps $result = self::validateMaxLengthNum($country, $zip); break; case 7: // exact length with gaps $result = self::validateLength($country, $zip); break; case 8: // exact length numerical with gaps $result = self::validateLengthNum($country, $zip); break; case 9: // special rules $result = self::validateSpecial($country, $zip); break; default: $result = false; break; } return $result; }
/** * Liefert einen Wert aus der Extension-Konfiguration. * Gibt es für die angegebene Extension keine Konfiguration, * wird als Fallback der Wert von mklib zurückgegeben. * * @param string $sValueKey * @param string $sExtKey * @param boolean $bFallback * @return mixed */ public static function getExtensionValue($sValueKey, $sExtKey = 'mklib', $bFallback = false) { if (!$sExtKey) { $sExtKey = 'mklib'; } tx_rnbase::load('tx_rnbase_configurations'); $mValue = tx_rnbase_configurations::getExtensionCfgValue($sExtKey, $sValueKey); if ($bFallback && $mValue === false && $sExtKey != 'mklib') { $mValue = tx_rnbase_configurations::getExtensionCfgValue('mklib', $sValueKey); } return $mValue; }
function getPlayer($media, $conf) { $mediaName = $media['file_name']; $mediaPath = $media['file_path']; // Die genaue Konfig holen wir für den Dateityp $fileType = $media['file_type']; $playerConf = $conf[$fileType . '.']['player.']; $color = $playerConf['backgroundColor']; $autoStart = $playerConf['autoStart']; $autoReplay = $playerConf['autoReplay']; tx_rnbase::load('tx_rnbase_util_Extensions'); $fePath = tx_rnbase_util_Extensions::siteRelPath('rn_base') . 'sv1/'; $out = '<object type="application/x-shockwave-flash" data="/' . $fePath . 'dewplayer.swf?son=' . $mediaPath . $mediaName . '&autostart=' . $autoStart . '&autoreplay=' . $autoReplay . '&bgcolor=' . $color . '" width="200" height="20"><param name="movie" value="/' . $fePath . 'dewplayer.swf?son=' . $mediaPath . $mediaName . '&autostart=' . $autoStart . '&autoreplay=' . $autoReplay . '&bgcolor=' . $color . '" />' . $media['title'] . '</object>'; return $out; }
/** * Liefert * * @param string $cmd * @return tx_xajax_response */ public function sendXajaxResponse($cmd) { t3lib_div::_GETset($cmd, 'PM'); //@TODO: ist $this->PA immer gleich? mehrere treeviews beachten tx_rnbase::load('tx_mklib_treelib_TreeView'); $oTreeView = tx_mklib_treelib_TreeView::makeInstance($this->PA, $this->oTceForm); tx_rnbase::load('tx_mklib_treelib_Renderer'); $oRenderer = tx_mklib_treelib_Renderer::makeInstance($this->PA, $this->oTceForm); $sContent = $oRenderer->getBrowsableTree($oTreeView); // ajax response erstellen /* @var $objResponse tx_xajax_response */ $objResponse = tx_rnbase::makeInstance('tx_xajax_response'); $objResponse->addAssign($oTreeView->treeName . '-tree-div', 'innerHTML', $sContent); return $objResponse; }
/** * Converts the given mixed data into an hashArray * Method taken from tx_div * * @param mixed data to be converted * @param string string of characters used to split first argument * @return array an hashArray */ private static function toHashArray($mixed, $splitCharacters = ',;:\\s') { if (is_string($mixed)) { tx_rnbase::load('tx_rnbase_util_Misc'); $array = tx_rnbase_util_Misc::explode($mixed, $splitCharacters); // TODO: Enable empty values by defining a better explode functions. for ($i = 0, $len = count($array); $i < $len; $i = $i + 2) { $hashArray[$array[$i]] = $array[$i + 1]; } } elseif (is_array($mixed)) { $hashArray = $mixed; } elseif (is_object($mixed) && method_exists($mixed, 'getArrayCopy')) { $hashArray = $mixed->getArrayCopy(); } else { $hashArray = array(); } return $hashArray; }
/** * * @param tx_rnbase_IParameters $parameters * @param tx_rnbase_configurations $configurations * @param ArrayObject $viewData * @return string error msg or null */ public function handleRequest(&$parameters, &$configurations, &$viewData) { // confIdExtended setzen $this->confIdExtended = $configurations->get($this->getConfId() . 'extendedConfId'); $this->confIdExtended = $this->confIdExtended ? $this->confIdExtended : 'default'; $confId = $this->getExtendedConfId(); // Filter erstellen. /* @var $filter tx_rnbase_filter_BaseFilter */ $filter = tx_rnbase_filter_BaseFilter::createFilter($parameters, $configurations, $viewData, $confId . 'filter.'); $fields = $options = array(); // Searcher instanzieren. Konfiguriert wird er über die options['searchdef'] /* @var $searcher tx_rnbase_util_SearchGeneric */ tx_rnbase::load('tx_rnbase_util_SearchBase'); $searcher = tx_rnbase_util_SearchBase::getInstance('tx_rnbase_util_SearchGeneric'); // Dem Filter den Searcher übergeben, fall er diese Möglichkeit bietet. if (method_exists($filter, 'setSearcher')) { $filter->setSearcher($searcher); } // Suche initialisieren und nur ausführen wenn der Filter es erlaubt. if ($doSearch = $filter->init($fields, $options)) { // Soll ein PageBrowser verwendet werden? if ($configurations->get($confId . 'pagebrowser')) { $pbOptions = array('searchcallback' => array($searcher, 'search')); $cbOptions['pbid'] = ($var = $configurations->get($confId . 'pagebrowser.cbid')) ? $var : 'pb' . $this->confIdExtended; $filter->handlePageBrowser($configurations, $confId . 'pagebrowser', $viewData, $fields, $options, $pbOptions); } // Soll ein CharBrowser verwendet werden? if ($configurations->get($confId . 'charbrowser')) { // optionen sammeln $cbOptions = array('searchcallback' => array($searcher, 'search')); $cbOptions['colname'] = ($var = $configurations->get($confId . 'charbrowser.colname')) ? $var : 'title'; $cbOptions['specials'] = ($var = $configurations->get($confId . 'charbrowser.specials')) ? $var : 'last'; $cbOptions['cbid'] = ($var = $configurations->get($confId . 'charbrowser.cbid')) ? $var : 'cb' . $this->confIdExtended; $filter->handleCharBrowser($configurations, $confId . 'charbrowser', $viewData, $fields, $options, $cbOptions); } // items besorgen. $items = $searcher->search($fields, $options); } else { $items = array(); } $viewData->offsetSet('items', $items); $viewData->offsetSet('searched', $doSearch); return null; }
/** * Returns an array with all attribute names not used in template * * We accept Tx_Rnbase_Domain_Model_DataInterface, but the model must also * implement IteratorAggregate! * * @param Tx_Rnbase_Domain_Model_Data $item * @param string $template * @param string $marker * @return array */ public static function findUnusedAttributes(Tx_Rnbase_Domain_Model_DataInterface $item, $template, $marker) { $ignore = array(); $minfo = self::containsMarker($template, $marker . '___MINFO'); $minfoArr = array(); foreach ($item as $key => $value) { if ($minfo) { $minfoArr[$key] = $marker . '_' . strtoupper($key); } if (!self::containsMarker($template, $marker . '_' . strtoupper($key))) { $ignore[] = $key; } } if ($minfo) { tx_rnbase::load('tx_rnbase_util_Debug'); $item->setProperty('__MINFO', tx_rnbase_util_Debug::viewArray($minfoArr)); } return $ignore; }
/** * Enter description here... * * @param string $view default name of view * @param tx_rnbase_configurations $configurations * @return string */ function render($view, &$configurations) { $this->_init($configurations); $templateCode = tx_rnbase_util_Files::getFileResource($this->getTemplate($view, '.html')); if (!strlen($templateCode)) { tx_rnbase::load('tx_rnbase_util_Misc'); tx_rnbase_util_Misc::mayday('TEMPLATE NOT FOUND: ' . $this->getTemplate($view, '.html')); } // Die ViewData bereitstellen $viewData =& $configurations->getViewData(); // Optional kann schon ein Subpart angegeben werden $subpart = $this->getMainSubpart($viewData); if (!empty($subpart)) { $templateCode = tx_rnbase_util_Templates::getSubpart($templateCode, $subpart); if (!strlen($templateCode)) { tx_rnbase::load('tx_rnbase_util_Misc'); tx_rnbase_util_Misc::mayday('SUBPART NOT FOUND: ' . $subpart); } } $controller = $this->getController(); if ($controller) { // disable substitution marker cache if ($configurations->getBool($controller->getConfId() . '_caching.disableSubstCache')) { tx_rnbase_util_Templates::disableSubstCache(); } } $out = $templateCode; $out = $this->createOutput($templateCode, $viewData, $configurations, $configurations->getFormatter()); $out = $this->renderPluginData($out, $configurations); if ($controller) { $params = array(); $params['confid'] = $controller->getConfId(); $params['item'] = $controller->getViewData()->offsetGet('item'); $params['items'] = $controller->getViewData()->offsetGet('items'); $markerArray = $subpartArray = $wrappedSubpartArray = array(); tx_rnbase_util_BaseMarker::callModules($out, $markerArray, $subpartArray, $wrappedSubpartArray, $params, $configurations->getFormatter()); $out = tx_rnbase_util_BaseMarker::substituteMarkerArrayCached($out, $markerArray, $subpartArray, $wrappedSubpartArray); } return $out; }
/** * sendet eine error mail für alle tasks die hängen geblieben * sind. außerdem werden diese tasks auf freezdeteced = exectime gesetzt * @param array $aPossiblyFrozenTasks * @return void */ protected function handleFrozenTasks($aPossiblyFrozenTasks) { //Nachrichten für den error mail versand $aMessages = $aUids = array(); foreach ($aPossiblyFrozenTasks as $aPossiblyFrozenTask) { $classname = tx_rnbase_util_TYPO3::isTYPO62OrHigher() ? get_class(unserialize($aPossiblyFrozenTask['serialized_task_object'])) : $aPossiblyFrozenTask['classname']; $aMessages[] = '"' . $classname . ' (Task-Uid: ' . $aPossiblyFrozenTask['uid'] . ')"'; $aUids[] = $aPossiblyFrozenTask['uid']; } //wir bauen eine exception damit die error mail von rnbase gebaut werden kann $sMsg = ' Die folgenden Scheduler Tasks hängen seit mindestens ' . tx_mklib_util_Scheduler::getFormattedTime($this->getOption('threshold')) . ' : ' . implode(', ', $aMessages); $oException = new Exception($sMsg, 0); tx_rnbase::load('tx_rnbase_util_Misc'); //die Mail soll immer geschickt werden $aOptions = array('ignoremaillock' => true); tx_rnbase_util_Misc::sendErrorMail($this->getOption('receiver'), 'tx_mklib_scheduler_CheckRunningTasks', $oException, $aOptions); //bei allen hängen geblibenen tasks freezedetected setzen //damit erst nach der errinerungszeit wieder eine mail versendet wird $this->setFreezeDetected($aUids); return $sMsg; }
* free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * The GNU General Public License can be found at * http://www.gnu.org/copyleft/gpl.html. * * This script is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * This copyright notice MUST APPEAR in all copies of the script! ***************************************************************/ require_once t3lib_extMgm::extPath('rn_base') . 'class.tx_rnbase.php'; tx_rnbase::load('tx_mklib_marker_MediaRecord'); /** * Diese Klasse ist für die Erstellung von Markerarrays der Section * * @package tx_mkdownloads * @subpackage tx_mkdownloads_marker * @author Michael Wagner * @deprecated use tx_mklib_marker_MediaRecord */ class tx_mklib_marker_DAMRecord extends tx_mklib_marker_MediaRecord { } if (defined('TYPO3_MODE') && $GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/mklib/marker/class.tx_mklib_marker_DAMRecord.php']) { include_once $GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/mklib/marker/class.tx_mklib_marker_DAMRecord.php']; }
* free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * The GNU General Public License can be found at * http://www.gnu.org/copyleft/gpl.html. * * This script is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * This copyright notice MUST APPEAR in all copies of the script! ***************************************************************/ require_once t3lib_extMgm::extPath('rn_base') . 'class.tx_rnbase.php'; tx_rnbase::load('tx_mklib_filter_Sorter'); /** * @author Hannes Bochmann <*****@*****.**> */ class tx_mklib_tests_fixtures_classes_SorterFilter extends tx_mklib_filter_Sorter { /** * (non-PHPdoc) * @see tx_rnbase_filter_BaseFilter::initFilter() */ protected function initFilter(&$fields, &$options, &$parameters, &$configurations, $confId) { return intval($this->initSorting()) . ' ' . $this->getSortBy() . ' ' . $this->getSortOrder(); } }
* the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * The GNU General Public License can be found at * http://www.gnu.org/copyleft/gpl.html. * * This script is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * This copyright notice MUST APPEAR in all copies of the script! */ require_once t3lib_extMgm::extPath('rn_base') . 'class.tx_rnbase.php'; tx_rnbase::load('tx_mklib_scheduler_GenericFieldProvider'); tx_rnbase::load('tx_mklib_util_DB'); /** * Fügt Felder im scheduler task hinzu * * @package TYPO3 * @subpackage tx_mklib * @author Hannes Bochmann <*****@*****.**> */ class tx_mklib_scheduler_DeleteFromDatabaseFieldProvider extends tx_mklib_scheduler_GenericFieldProvider implements tx_scheduler_AdditionalFieldProvider { /** * * @return array * @todo CSH einfügen */ protected function getAdditionalFieldConfig()
* free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * The GNU General Public License can be found at * http://www.gnu.org/copyleft/gpl.html. * * This script is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * This copyright notice MUST APPEAR in all copies of the script! ***************************************************************/ tx_rnbase::load('tx_rnbase_util_Typo3Classes'); class tx_rnbase_tests_configurations_testcase extends Tx_Phpunit_TestCase { function test_tsSetup() { $GLOBALS['TSFE'] = new tx_rnbase_tsfeDummy(); $GLOBALS['TSFE']->tmpl->setup['lib.']['match.'] = array('limit' => '10', 'count' => '99'); $configurationArray['matchtable.']['match'] = '< lib.match'; $configurationArray['matchtable.']['match.']['limit'] = '100'; $cObj = tx_rnbase::makeInstance(tx_rnbase_util_Typo3Classes::getContentObjectRendererClass()); $configurations = tx_rnbase::makeInstance('tx_rnbase_configurations'); $configurations->init($configurationArray, $cObj, 'extkey_text', 'rntest'); $this->assertEquals(100, $configurations->get('matchtable.match.limit'), 'Limit should be 100'); $this->assertEquals(99, $configurations->get('matchtable.match.count'), 'count should be 99'); } /**
* of a derived class or alternatively provide it as parameter. * * 2.) An configuration array of rendered TypoScript like it is handeled to the main function of plugins by the * outer framework: tx_myextension_controller->main($out, $configurationArray). This should be called after 1.) * to give the possibility to overwrite global settings. * * 3.) The last load typically comes from the flexform to give the enduser the possibilty for finegrained selections. * * @author Elmar Hinz <*****@*****.**> * @package TYPO3 * @subpackage tx_rnbase * */ tx_rnbase::load('tx_rnbase_util_Network'); tx_rnbase::load('tx_rnbase_util_Typo3Classes'); tx_rnbase::load('tx_rnbase_util_Arrays'); class tx_rnbase_configurations { // We store all Data to an internal ArrayObject var $_dataStore; var $_viewData; var $_parameters; var $_keepVars; var $_qualifier; var $pluginUid; // Die UID des Plugins (also des Content-Objekts) var $cObj; // Das originale cObj des Plugins var $_cObjs; // Container für alternative cObjs innerhalb des Plugins var $LLkey = 'default';
/** * * @param tx_rnbase_configurations $configurations * @param unknown $confId */ protected function addResources($configurations, $confId) { tx_rnbase::load('tx_rnbase_util_Files'); $pageRenderer = tx_rnbase_util_TYPO3::getTSFE()->getPageRenderer(); $files = $configurations->get($confId . 'includeJSFooter.'); if (is_array($files)) { foreach ($files as $file) { if ($file = tx_rnbase_util_Files::getFileName($file)) { $pageRenderer->addJsFooterFile($file); } } } $files = $configurations->get($confId . 'includeCSS.'); if (is_array($files)) { foreach ($files as $file) { if ($file = tx_rnbase_util_Files::getFileName($file)) { $pageRenderer->addCssFile($file); } } } }
* modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ***************************************************************/ tx_rnbase::load('tx_rnbase_util_BaseMarker'); tx_rnbase::load('tx_rnbase_util_PageBrowser'); tx_rnbase::load('tx_rnbase_util_Math'); /** * Contains utility functions for HTML-Forms */ class tx_rnbase_util_PageBrowserMarker implements PageBrowserMarker { private $pagePartsDef = array('normal', 'current', 'first', 'last', 'prev', 'next', 'prev_bullets', 'next_bullets'); /** * Erstellung des PageBrowserMarkers */ function __construct() { } /** * Initialisierung des PageBrowserMarkers mit den PageBrowser */
* free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * The GNU General Public License can be found at * http://www.gnu.org/copyleft/gpl.html. * * This script is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * This copyright notice MUST APPEAR in all copies of the script! ***************************************************************/ \tx_rnbase::load('Tx_Rnbase_Backend_Handler_SearchHandler'); /** * Devlog Entry handler * * @package TYPO3 * @subpackage DMK\Mklog * @author Michael Wagner */ class DevlogEntryHandler extends \Tx_Rnbase_Backend_Handler_SearchHandler { /** * Returns a unique ID for this handler. * This is used to created the subpart in template. * * @return string */
* it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * The GNU General Public License can be found at * http://www.gnu.org/copyleft/gpl.html. * * This script is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * This copyright notice MUST APPEAR in all copies of the script! */ require_once t3lib_extMgm::extPath('rn_base') . 'class.tx_rnbase.php'; tx_rnbase::load('tx_rnbase_model_base'); /** * Interface für PLZ-Validierung von Ländern * * @package tx_mklib * @subpackage tx_mklib_model * @author René Nitzsche */ interface tx_mklib_interface_IZipCountry { /** * Liefert den ISO2 Code des Landes. DE,CZ,PL usw. * * @return String */ public function getISO2();
* * The GNU General Public License can be found at * http://www.gnu.org/copyleft/gpl.html. * * This script is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * This copyright notice MUST APPEAR in all copies of the script! */ /** * benötigte Klassen einbinden */ require_once t3lib_extMgm::extPath('rn_base') . 'class.tx_rnbase.php'; tx_rnbase::load('tx_mklib_util_ServiceRegistry'); /** * Validatoren für den WordList Service * * @author hbochmann * @package tx_mklib * @subpackage tx_mklib_validator */ class tx_mklib_validator_WordList { /** * @var tx_mklib_srv_Wordlist */ protected static $wordlistService = NULL; /** * Prüft ob in einem String kein Wort, das blacklisted ist, vorkommt