当前位置: 首页>>代码示例>>PHP>>正文


PHP tx_rnbase类代码示例

本文整理汇总了PHP中tx_rnbase的典型用法代码示例。如果您正苦于以下问题:PHP tx_rnbase类的具体用法?PHP tx_rnbase怎么用?PHP tx_rnbase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了tx_rnbase类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: handleException

 /**
  * 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;
 }
开发者ID:RocKordier,项目名称:rn_base,代码行数:36,代码来源:class.tx_rnbase_exception_Handler.php

示例2: testGetExtensionCfgValue

 public function testGetExtensionCfgValue()
 {
     $GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['dummyExtension'] = serialize(array('testConfig' => 'testConfigValue'));
     $extensionConfiguration = tx_rnbase::makeInstance('tx_mklib_util_ExtensionConfigurationTest');
     $testConfigValue = $extensionConfiguration->getTestConfig();
     $this->assertEquals('testConfigValue', $testConfigValue);
 }
开发者ID:RocKordier,项目名称:typo3-mklib,代码行数:7,代码来源:class.tx_mklib_tests_util_ExtensionConfiguration_testcase.php

示例3: getCurrentItem

 /**
  * 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;
 }
开发者ID:RocKordier,项目名称:typo3-mklib,代码行数:39,代码来源:class.tx_mklib_mod1_util_Helper.php

示例4: getCObj

 /**
  * Returns an instanceof tslib_cObj or \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer.
  * Since this object has functions for database access and frontend your ControllerAction
  * should always provide cObj for model and view. This ensures only one instance per request.
  *
  * @return an instance of \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer or tslib_cObj
  */
 function getCObj()
 {
     if (!$this->cObject) {
         $this->cObject = tx_rnbase::makeInstance(tx_rnbase_util_Typo3Classes::getContentObjectRendererClass());
     }
     return $this->cObject;
 }
开发者ID:RocKordier,项目名称:rn_base,代码行数:14,代码来源:class.tx_rnbase_action_Base.php

示例5: testGeneratorReturnsCorrectPlainTextWhenNoInfoTable

 /**
  * Prüft ob korrekter text zurück erzeugt wird
  * Das umfasst auch Sonderzeichen
  */
 public function testGeneratorReturnsCorrectPlainTextWhenNoInfoTable()
 {
     $aParams = array('defaultFontFace' => 0, 'defaultFontSize' => 22, 'paperOrientation' => 1, 'rtfVersion' => 1);
     $oRTFGenerator = tx_rnbase::makeInstance('tx_mklib_util_RTFGenerator', $aParams);
     $sRTFText = $oRTFGenerator->getRTF('###SPECIALCHAR_(###<strong>Das ist ein schöner Testtext.</strong> Auch mit ###SPECIALCHAR_)### verschiedenen ßonderzeichen und Ähnlichem. Sogar einem ###SPECIALCHAR_*###');
     $this->assertEquals('{\\rtf1\\ansi\\deff0{\\fonttbl{\\f0\\fcharset0\\fnil Arial;}{\\f1\\fcharset0\\fnil Wingdings;}}{\\f0\\fs22\\dn0 }{\\f1\\fs25\\dn0 (}{\\f0\\fs22\\dn0}{\\b\\f0\\fs22\\dn0 Das ist ein sch\\\'f6ner Testtext. }{\\f0\\fs22\\dn0 Auch mit }{\\f1\\fs25\\dn0 )}{\\f0\\fs22\\dn0 verschiedenen \\\'dfonderzeichen und \\\'c4hnlichem. Sogar einem }{\\f1\\fs25\\dn0 *}{\\f0\\fs22\\dn0}}', $sRTFText, 'Der generierte Text ist falsch.');
 }
开发者ID:RocKordier,项目名称:typo3-mklib,代码行数:11,代码来源:class.tx_mklib_tests_util_RTFGenerator_testcase.php

示例6: fillPath

 /**
  * 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;
 }
开发者ID:RocKordier,项目名称:typo3-mklib,代码行数:31,代码来源:class.tx_mklib_model_Media.php

示例7: getDamDB

 private static function getDamDB()
 {
     if (!self::$damDb) {
         self::$damDb = tx_rnbase::makeInstance('tx_dam_db');
     }
     return self::$damDb;
 }
开发者ID:RocKordier,项目名称:rn_base,代码行数:7,代码来源:class.tx_rnbase_util_MediaMarker.php

示例8: send45

 protected function send45()
 {
     /* @var $mail TYPO3\CMS\Core\Mail\MailMessage */
     $mail = tx_rnbase::makeInstance(tx_rnbase_util_Typo3Classes::getMailMessageClass());
     $mail->setFrom(array($this->from => $this->fromName));
     $mail->setTo(tx_rnbase_util_Strings::trimExplode(',', $this->toAsString));
     $mail->setSubject($this->subject);
     if ($this->replyTo) {
         $mail->addReplyTo($this->replyTo, $this->replyToName);
     }
     // Or set it after like this
     if ($this->htmlPart) {
         $mail->setBody($this->htmlPart, 'text/html');
     }
     // Add alternative parts with addPart()
     if ($this->textPart) {
         $mail->addPart($this->textPart, 'text/plain');
     }
     if (!empty($this->attachments)) {
         foreach ($this->attachments as $attachment) {
             if (!$mail->attach(Swift_Attachment::fromPath($attachment['src']))) {
                 tx_rnbase_util_Logger::warn('Adding attachment failed!', 'rn_base', array('subject' => $mail->subject, 'to' => $this->toAsString, 'attachment' => $attachment));
             }
         }
     }
     $mail->send();
 }
开发者ID:RocKordier,项目名称:rn_base,代码行数:27,代码来源:class.tx_rnbase_util_Mail.php

示例9: getConfig

 private function getConfig($confArr)
 {
     $cObj = tx_rnbase::makeInstance(tx_rnbase_util_Typo3Classes::getContentObjectRendererClass());
     $configurations = tx_rnbase::makeInstance('tx_rnbase_configurations');
     $configurations->init($confArr, $cObj, 'tx_rnbase', 'rnbase');
     return $configurations;
 }
开发者ID:RocKordier,项目名称:rn_base,代码行数:7,代码来源:class.tx_rnbase_tests_listbuilder_testcase.php

示例10: execute

 /**
  * 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;
 }
开发者ID:DMKEBUSINESSGMBH,项目名称:typo3-mklog,代码行数:34,代码来源:class.tx_mklog_scheduler_WatchDog.php

示例11: getCurrency

 /**
  * @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();
 }
开发者ID:RocKordier,项目名称:typo3-mklib,代码行数:10,代码来源:class.tx_mklib_srv_Finance.php

示例12: init

 /**
  * Init object
  *
  * @param 	tx_rnbase_mod_IModule $mod
  * @param 	array $options
  * @param 	string $sSelector
  */
 protected function init(tx_rnbase_mod_IModule $mod, $options, $sSelector = 'tx_mklib_mod1_util_Selector')
 {
     $this->options = $options;
     $this->mod = $mod;
     $this->formTool = $mod->getFormTool();
     $this->selector = tx_rnbase::makeInstance($sSelector);
     $this->selector->init($mod);
 }
开发者ID:RocKordier,项目名称:typo3-mklib,代码行数:15,代码来源:class.tx_mklib_mod1_searcher_Base.php

示例13: __construct

 /**
  */
 public function __construct()
 {
     /** @var TcaDatabaseRecord $formDataGroup */
     $formDataGroup = tx_rnbase::makeInstance('TYPO3\\CMS\\Backend\\Form\\FormDataGroup\\TcaDatabaseRecord');
     $this->formDataCompiler = tx_rnbase::makeInstance('TYPO3\\CMS\\Backend\\Form\\FormDataCompiler', $formDataGroup);
     $this->nodeFactory = tx_rnbase::makeInstance('TYPO3\\CMS\\Backend\\Form\\NodeFactory');
     $this->formResultCompiler = tx_rnbase::makeInstance('TYPO3\\CMS\\Backend\\Form\\FormResultCompiler');
 }
开发者ID:RocKordier,项目名称:rn_base,代码行数:10,代码来源:FormBuilder.php

示例14: includeLocalLang

 /**
  * @return tx_rnbase_util_Lang
  */
 private function includeLocalLang()
 {
     $llFile = $this->getLLFile();
     /* @var $lang tx_rnbase_util_Lang */
     $lang = tx_rnbase::makeInstance('tx_rnbase_util_Lang');
     $lang->loadLLFile($llFile);
     return $lang;
 }
开发者ID:RocKordier,项目名称:rn_base,代码行数:11,代码来源:class.tx_rnbase_util_Wizicon.php

示例15: testMakeLink

 public function testMakeLink()
 {
     $oLinker = tx_rnbase::makeInstance('tx_mklib_tests_fixtures_classes_DummyLinker');
     $oModel = tx_rnbase::makeInstance('tx_rnbase_model_base', 1);
     $oModel->uid = 1;
     $oFormTool = tx_rnbase::makeInstance('tx_rnbase_util_FormTool');
     $this->assertEquals('<input type="submit" name="showTest[tx_rnbase_model_base|1]" value="" />', $oLinker->makeLink($oModel, $oFormTool), 'Fsclher Link.');
 }
开发者ID:RocKordier,项目名称:typo3-mklib,代码行数:8,代码来源:class.tx_mklib_tests_mod1_linker_Base_testcase.php


注:本文中的tx_rnbase类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。