本文整理汇总了PHP中TYPO3\CMS\Core\Utility\GeneralUtility::devLog方法的典型用法代码示例。如果您正苦于以下问题:PHP GeneralUtility::devLog方法的具体用法?PHP GeneralUtility::devLog怎么用?PHP GeneralUtility::devLog使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TYPO3\CMS\Core\Utility\GeneralUtility
的用法示例。
在下文中一共展示了GeneralUtility::devLog方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: execute
/**
* Main method which is called by EXT:scheduler.
*
* Needs to return TRUE or FALSE in order to tell EXT:scheduler whether the task
* went through smoothly.
*
* @return bool
*/
public function execute()
{
$this->init();
$migrationQueue = array();
$res = $this->database->exec_SELECTquery('tt_content.uid AS tt_content_uid, sys_file_reference.uid AS sys_file_reference_uid, tt_content.imagecaption AS imagecaption', 'tt_content INNER JOIN sys_file_reference ON tt_content.uid = sys_file_reference.uid_foreign', 'tt_content.imagecaption != "" AND sys_file_reference.fieldname = "image" AND sys_file_reference.tablenames = "tt_content"');
while ($row = $this->database->sql_fetch_assoc($res)) {
// remove trailing linebreaks (and spaces) in imagecaption
$row['imagecaption'] = preg_replace('/(\\r\\n|\\r|\\n| )+$/', '', $row['imagecaption']);
$imagecaptionLines = preg_split("/\r\n|\r|\n/", $row['imagecaption']);
$numberOfImagecaptionLines = count($imagecaptionLines);
if ($numberOfImagecaptionLines > $this->getNumberOfFalRecordsOfTtContentRecord($row['tt_content_uid'])) {
// ...it is very likely that tt_content.imagecaption is not used as it
// is generally supposed to be used. Most probably tt_content.imagecaption
// is not used as a one-line-per-image field but as a all-lines-for-one-image
// field. This records must be migrated manually.
GeneralUtility::devLog('tt_content record ' . $row['tt_content_uid'] . ": The number of lines in tt_content.imagecaption exceeds the record's number of FAL records! Therefore tt_content.imagecaption was neither migrated nor deleted for this tt_content record.", 'dam_falmigration', 2);
} else {
if (!array_key_exists($row['tt_content_uid'], $migrationQueue)) {
$migrationQueue[$row['tt_content_uid']] = $imagecaptionLines;
}
}
}
$this->migrate($migrationQueue);
// mark task as successfully executed
return TRUE;
}
示例2: render
/**
* Helper function to find the parents class recordType
* @param \EBT\ExtensionBuilder\Domain\Model\DomainObject $domainObject
* @return string
*/
public function render(\EBT\ExtensionBuilder\Domain\Model\DomainObject $domainObject)
{
$classSettings = $this->configurationManager->getExtbaseClassConfiguration($domainObject->getParentClass());
if (isset($classSettings['recordType'])) {
$parentRecordType = \EBT\ExtensionBuilder\Utility\Tools::convertClassNameToRecordType($classSettings['recordType']);
} else {
$parentRecordType = \EBT\ExtensionBuilder\Utility\Tools::convertClassNameToRecordType($domainObject->getParentClass());
$existingTypes = $GLOBALS['TCA'][$domainObject->getDatabaseTableName()]['types'];
\TYPO3\CMS\Core\Utility\GeneralUtility::devLog('Parent Record type: ' . $parentRecordType, 'extension_builder', 2, $existingTypes);
if (is_array($existingTypes) && !isset($existingTypes[$parentRecordType])) {
// no types field for parent record type configured, use the default type 1
if (isset($existingTypes['1'])) {
$parentRecordType = 1;
} else {
//if it not exists get first existing key
$parentRecordType = reset(array_keys($existingTypes));
}
}
}
$this->templateVariableContainer->add('parentModelName', end(explode('\\', $domainObject->getParentClass())));
$this->templateVariableContainer->add('parentRecordType', $parentRecordType);
$content = $this->renderChildren();
$this->templateVariableContainer->remove('parentRecordType');
$this->templateVariableContainer->remove('parentModelName');
return $content;
}
示例3: main
/**
* The main method of the PlugIn
*
* @access public
*
* @param string $content: The PlugIn content
* @param array $conf: The PlugIn configuration
*
* @return string The content that is displayed on the website
*/
public function main($content, $conf)
{
$this->init($conf);
// Turn cache on.
$this->setCache(TRUE);
// Quit without doing anything if required configuration variables are not set.
if (empty($this->conf['pages'])) {
if (TYPO3_DLOG) {
\TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_collection->main(' . $content . ', [data])] Incomplete plugin configuration', $this->extKey, SYSLOG_SEVERITY_WARNING, $conf);
}
return $content;
}
// Load template file.
if (!empty($this->conf['templateFile'])) {
$this->template = $this->cObj->getSubpart($this->cObj->fileResource($this->conf['templateFile']), '###TEMPLATE###');
} else {
$this->template = $this->cObj->getSubpart($this->cObj->fileResource('EXT:dlf/plugins/collection/template.tmpl'), '###TEMPLATE###');
}
// Get hook objects.
$this->hookObjects = tx_dlf_helper::getHookObjects($this->scriptRelPath);
if (!empty($this->piVars['collection'])) {
$this->showSingleCollection(intval($this->piVars['collection']));
} else {
$content .= $this->showCollectionList();
}
return $this->pi_wrapInBaseClass($content);
}
示例4: main
/**
* The main method of the PlugIn
*
* @access public
*
* @param string $content: The PlugIn content
* @param array $conf: The PlugIn configuration
*
* @return string The content that is displayed on the website
*/
public function main($content, $conf)
{
$this->init($conf);
// Turn cache on.
$this->setCache(TRUE);
// Quit without doing anything if required configuration variables are not set.
if (empty($this->conf['pages'])) {
if (TYPO3_DLOG) {
\TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_statistics->main(' . $content . ', [data])] Incomplete plugin configuration', $this->extKey, SYSLOG_SEVERITY_WARNING, $conf);
}
return $content;
}
// Get description.
$content .= $this->pi_RTEcssText($this->conf['description']);
// Check for selected collections.
if ($this->conf['collections']) {
// Include only selected collections.
$resultTitles = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query('tx_dlf_documents.uid AS uid', 'tx_dlf_documents', 'tx_dlf_relations', 'tx_dlf_collections', 'AND tx_dlf_documents.pid=' . intval($this->conf['pages']) . ' AND tx_dlf_collections.pid=' . intval($this->conf['pages']) . ' AND tx_dlf_documents.partof=0 AND tx_dlf_collections.uid IN (' . $GLOBALS['TYPO3_DB']->cleanIntList($this->conf['collections']) . ') AND tx_dlf_relations.ident=' . $GLOBALS['TYPO3_DB']->fullQuoteStr('docs_colls', 'tx_dlf_relations') . tx_dlf_helper::whereClause('tx_dlf_documents') . tx_dlf_helper::whereClause('tx_dlf_collections'), 'tx_dlf_documents.uid', '', '');
$resultVolumes = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query('tx_dlf_documents.uid AS uid', 'tx_dlf_documents', 'tx_dlf_relations', 'tx_dlf_collections', 'AND tx_dlf_documents.pid=' . intval($this->conf['pages']) . ' AND tx_dlf_collections.pid=' . intval($this->conf['pages']) . ' AND NOT tx_dlf_documents.uid IN (SELECT DISTINCT tx_dlf_documents.partof FROM tx_dlf_documents WHERE NOT tx_dlf_documents.partof=0' . tx_dlf_helper::whereClause('tx_dlf_documents') . ') AND tx_dlf_collections.uid IN (' . $GLOBALS['TYPO3_DB']->cleanIntList($this->conf['collections']) . ') AND tx_dlf_relations.ident=' . $GLOBALS['TYPO3_DB']->fullQuoteStr('docs_colls', 'tx_dlf_relations') . tx_dlf_helper::whereClause('tx_dlf_documents') . tx_dlf_helper::whereClause('tx_dlf_collections'), 'tx_dlf_documents.uid', '', '');
} else {
// Include all collections.
$resultTitles = $GLOBALS['TYPO3_DB']->exec_SELECTquery('tx_dlf_documents.uid AS uid', 'tx_dlf_documents', 'tx_dlf_documents.pid=' . intval($this->conf['pages']) . ' AND tx_dlf_documents.partof=0' . tx_dlf_helper::whereClause('tx_dlf_documents'), '', '', '');
$resultVolumes = $GLOBALS['TYPO3_DB']->exec_SELECTquery('tx_dlf_documents.uid AS uid', 'tx_dlf_documents', 'tx_dlf_documents.pid=' . intval($this->conf['pages']) . ' AND NOT tx_dlf_documents.uid IN (SELECT DISTINCT tx_dlf_documents.partof FROM tx_dlf_documents WHERE NOT tx_dlf_documents.partof=0' . tx_dlf_helper::whereClause('tx_dlf_documents') . ')' . tx_dlf_helper::whereClause('tx_dlf_documents'), '', '', '');
}
$countTitles = $GLOBALS['TYPO3_DB']->sql_num_rows($resultTitles);
$countVolumes = $GLOBALS['TYPO3_DB']->sql_num_rows($resultVolumes);
// Set replacements.
$replace = array('key' => array('###TITLES###', '###VOLUMES###'), 'value' => array($countTitles . ($countTitles > 1 ? $this->pi_getLL('titles', '', TRUE) : $this->pi_getLL('title', '', TRUE)), $countVolumes . ($countVolumes > 1 ? $this->pi_getLL('volumes', '', TRUE) : $this->pi_getLL('volume', '', TRUE))));
// Apply replacements.
$content = str_replace($replace['key'], $replace['value'], $content);
return $this->pi_wrapInBaseClass($content);
}
示例5: writeLogEntries
/**
* Writes exception to different logs
*
* @param \Exception|\Throwable $exception The exception(PHP 5.x) or throwable(PHP >= 7.0) object.
* @param string $context The context where the exception was thrown, WEB or CLI
* @return void
* @see \TYPO3\CMS\Core\Utility\GeneralUtility::sysLog(), \TYPO3\CMS\Core\Utility\GeneralUtility::devLog()
* @TODO #72293 This will change to \Throwable only if we are >= PHP7.0 only
*/
protected function writeLogEntries($exception, $context)
{
// Do not write any logs for this message to avoid filling up tables or files with illegal requests
if ($exception->getCode() === 1396795884) {
return;
}
$filePathAndName = $exception->getFile();
$exceptionCodeNumber = $exception->getCode() > 0 ? '#' . $exception->getCode() . ': ' : '';
$logTitle = 'Core: Exception handler (' . $context . ')';
$logMessage = 'Uncaught TYPO3 Exception: ' . $exceptionCodeNumber . $exception->getMessage() . ' | ' . get_class($exception) . ' thrown in file ' . $filePathAndName . ' in line ' . $exception->getLine();
if ($context === 'WEB') {
$logMessage .= '. Requested URL: ' . GeneralUtility::getIndpEnv('TYPO3_REQUEST_URL');
}
$backtrace = $exception->getTrace();
// Write error message to the configured syslogs
GeneralUtility::sysLog($logMessage, $logTitle, GeneralUtility::SYSLOG_SEVERITY_FATAL);
// When database credentials are wrong, the exception is probably
// caused by this. Therefor we cannot do any database operation,
// otherwise this will lead into recurring exceptions.
try {
// Write error message to devlog
// see: $TYPO3_CONF_VARS['SYS']['enable_exceptionDLOG']
if (TYPO3_EXCEPTION_DLOG) {
GeneralUtility::devLog($logMessage, $logTitle, 3, array('TYPO3_MODE' => TYPO3_MODE, 'backtrace' => $backtrace));
}
// Write error message to sys_log table
$this->writeLog($logTitle . ': ' . $logMessage);
} catch (\Exception $exception) {
}
}
示例6: writeLogEntries
/**
* Writes exception to different logs
*
* @param Exception $exception The exception
* @param string $context The context where the exception was thrown, WEB or CLI
* @return void
* @see t3lib_div::sysLog(), t3lib_div::devLog()
*/
protected function writeLogEntries(\Exception $exception, $context)
{
$filePathAndName = $exception->getFile();
$exceptionCodeNumber = $exception->getCode() > 0 ? '#' . $exception->getCode() . ': ' : '';
$logTitle = 'Core: Exception handler (' . $context . ')';
$logMessage = 'Uncaught TYPO3 Exception: ' . $exceptionCodeNumber . $exception->getMessage() . ' | ' . get_class($exception) . ' thrown in file ' . $filePathAndName . ' in line ' . $exception->getLine();
if ($context === 'WEB') {
$logMessage .= '. Requested URL: ' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_REQUEST_URL');
}
$backtrace = $exception->getTrace();
// Write error message to the configured syslogs
\TYPO3\CMS\Core\Utility\GeneralUtility::sysLog($logMessage, $logTitle, \TYPO3\CMS\Core\Utility\GeneralUtility::SYSLOG_SEVERITY_FATAL);
// When database credentials are wrong, the exception is probably
// caused by this. Therefor we cannot do any database operation,
// otherwise this will lead into recurring exceptions.
try {
// In case an error occurs before a database connection exists, try
// to connect to the DB to be able to write the devlog/sys_log entry
if (isset($GLOBALS['TYPO3_DB']) && is_object($GLOBALS['TYPO3_DB']) && empty($GLOBALS['TYPO3_DB']->link)) {
$GLOBALS['TYPO3_DB']->connectDB();
}
// Write error message to devlog
// see: $TYPO3_CONF_VARS['SYS']['enable_exceptionDLOG']
if (TYPO3_EXCEPTION_DLOG) {
\TYPO3\CMS\Core\Utility\GeneralUtility::devLog($logMessage, $logTitle, 3, array('TYPO3_MODE' => TYPO3_MODE, 'backtrace' => $backtrace));
}
// Write error message to sys_log table
$this->writeLog($logTitle . ': ' . $logMessage);
} catch (\Exception $exception) {
}
}
示例7: devLog
/**
* Devlog if enabled
*
* @param string $functionName Functionname
* @param string $additionalData The log data
*
* @return void
*/
public static function devLog($functionName, $additionalData = '')
{
self::loadExtConf();
if (self::$extConf['enableDevLog']) {
\TYPO3\CMS\Core\Utility\GeneralUtility::devLog($functionName, 'varnish', 0, $additionalData);
}
}
示例8: processLoginData
/**
* Process the submitted credentials.
* In this case decrypt the password if it is RSA encrypted.
*
* @param array $loginData Credentials that are submitted and potentially modified by other services
* @param string $passwordTransmissionStrategy Keyword of how the password has been hashed or encrypted before submission
* @return boolean
*/
public function processLoginData(array &$loginData, $passwordTransmissionStrategy)
{
$isProcessed = FALSE;
if ($passwordTransmissionStrategy === 'rsa') {
$storage = \TYPO3\CMS\Rsaauth\Storage\StorageFactory::getStorage();
/** @var $storage \TYPO3\CMS\Rsaauth\Storage\AbstractStorage */
// Decrypt the password
$password = $loginData['uident'];
$key = $storage->get();
if ($key != NULL && substr($password, 0, 4) === 'rsa:') {
// Decode password and store it in loginData
$decryptedPassword = $this->backend->decrypt($key, substr($password, 4));
if ($decryptedPassword != NULL) {
$loginData['uident_text'] = $decryptedPassword;
$isProcessed = TRUE;
} else {
if ($this->pObj->writeDevLog) {
\TYPO3\CMS\Core\Utility\GeneralUtility::devLog('Process login data: Failed to RSA decrypt password', 'TYPO3\\CMS\\Rsaauth\\RsaAuthService');
}
}
// Remove the key
$storage->put(NULL);
} else {
if ($this->pObj->writeDevLog) {
\TYPO3\CMS\Core\Utility\GeneralUtility::devLog('Process login data: passwordTransmissionStrategy has been set to "rsa" but no rsa encrypted password has been found.', 'TYPO3\\CMS\\Rsaauth\\RsaAuthService');
}
}
}
return $isProcessed;
}
示例9: render
/**
* Download a file
*
* @param string $file Path to the file
* @param array $configuration configuration used to render the filelink cObject
* @param boolean $hideError define if an error should be displayed if file not found
* @param string $class optional class
* @param string $target target
* @param string $alt alt text
* @param string $title title text
* @param integer $secure news uid
* @return string
* @throws \TYPO3\CMS\Fluid\Core\ViewHelper\Exception\InvalidVariableException
*/
public function render($file, $configuration = array(), $hideError = FALSE, $class = '', $target = '', $alt = '', $title = '', $secure = 0)
{
if (!is_file($file)) {
$errorMessage = sprintf('Given file "%s" for %s is not valid', htmlspecialchars($file), get_class());
\TYPO3\CMS\Core\Utility\GeneralUtility::devLog($errorMessage, 'moox_news', \TYPO3\CMS\Core\Utility\GeneralUtility::SYSLOG_SEVERITY_WARNING);
if (!$hideError) {
throw new \TYPO3\CMS\Fluid\Core\ViewHelper\Exception\InvalidVariableException('Given file is not a valid file: ' . htmlspecialchars($file));
}
}
$cObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('tslib_cObj');
$fileInformation = pathinfo($file);
$fileInformation['file'] = $file;
$fileInformation['size'] = filesize($file);
$cObj->data = $fileInformation;
// set a basic configuration for cObj->filelink
$tsConfiguration = array('path' => $fileInformation['dirname'] . '/', 'ATagParams' => 'class="download-link basic-class ' . strtolower($fileInformation['extension']) . (!empty($class) ? ' ' . $class : '') . '"', 'labelStdWrap.' => array('cObject.' => array('value' => $this->renderChildren())));
// Fallback if no configuration given
if (!is_array($configuration)) {
$configuration = array('labelStdWrap.' => array('cObject' => 'TEXT'));
} else {
/** @var $typoscriptService \TYPO3\CMS\Extbase\Service\TypoScriptService */
$typoscriptService = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Service\\TypoScriptService');
$configuration = $typoscriptService->convertPlainArrayToTypoScriptArray($configuration);
}
// merge default configuration with optional configuration
\TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($tsConfiguration, $configuration);
if (!empty($target)) {
$tsConfiguration['target'] = $target;
}
if (!empty($alt)) {
$tsConfiguration['altText'] = $alt;
}
if (!empty($title)) {
$tsConfiguration['titleText'] = $title;
}
$link = $cObj->filelink($fileInformation['basename'], $tsConfiguration);
$extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['moox_news']);
$securityExcludedFileTypes = array();
if ($extConf['securityExcludedFileTypes'] != "") {
$securityExcludedFileTypes = explode(",", $extConf['securityExcludedFileTypes']);
}
$securityFileLocators = array();
if ($extConf['securityFileLocators'] != "") {
$securityFileLocators = explode(",", $extConf['securityFileLocators']);
}
if ($extConf['securityUrlIndicator'] != "") {
$securityUrlIndicator = $extConf['securityUrlIndicator'];
} else {
$securityUrlIndicator = "mxsecured";
}
if ($secure > 0 && !in_array($fileInformation['extension'], $securityExcludedFileTypes)) {
foreach ($securityFileLocators as $securityFileLocator) {
$dividerPos = strpos($link, $securityFileLocator);
if ($dividerPos !== FALSE) {
$link = str_replace($securityFileLocator, $securityFileLocator . $securityUrlIndicator . '/' . base_convert($secure + 999999, 10, 21) . '/' . $GLOBALS["TSFE"]->id . '/', $link);
}
}
}
return $link;
}
示例10: clearCachePostProc
/**
* Clear Cach Post Processing Hook
*
* @param $params
* @param $pObj
*/
public function clearCachePostProc(&$params, &$pObj)
{
$now = time();
//cached files older than x minutes.
$minutes = (int) $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['webkitpdf']['cacheThreshold'];
$threshold = $now - $minutes * 60;
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid,crdate,filename', 'tx_webkitpdf_cache', 'crdate<' . $threshold);
if ($res && $GLOBALS['TYPO3_DB']->sql_num_rows($res) > 0) {
$filenames = array();
while (($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) !== FALSE) {
$filenames[] = $row['filename'];
}
$GLOBALS['TYPO3_DB']->sql_free_result($res);
$GLOBALS['TYPO3_DB']->exec_DELETEquery('tx_webkitpdf_cache', 'crdate<' . $threshold);
foreach ($filenames as $file) {
if (file_exists($file)) {
unlink($file);
}
}
// Write a message to devlog
if ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['webkitpdf']['debug'] === 1) {
\TYPO3\CMS\Core\Utility\GeneralUtility::devLog('Clearing cached files older than ' . $minutes . ' minutes.', 'webkitpdf', -1);
}
}
}
示例11: initRecords
/**
* Initializes the Records
* All Products are read, no matter what the rights - only editing is restricted!
*
* @param int $index Leaf index
* @param array $parentIndices Parent Indices
* @param \CommerceTeam\Commerce\Tree\Leaf\Data $parentLeafData Parent leafData
*
* @return void
*/
public function initRecords($index, array $parentIndices, \CommerceTeam\Commerce\Tree\Leaf\Data &$parentLeafData)
{
if (!is_numeric($index) || !is_array($parentIndices) || is_null($parentLeafData)) {
if (TYPO3_DLOG) {
\TYPO3\CMS\Core\Utility\GeneralUtility::devLog('initRecords (CommerceTeam\\Commerce\\Tree\\Leaf\\SlaveData) gets passed invalid parameters.', COMMERCE_EXTKEY, 3);
}
return;
}
// Check if User's Group may view the records
$backendUser = $this->getBackendUser();
if (!$backendUser->check('tables_select', $this->table)) {
$this->records = null;
if (TYPO3_DLOG) {
\TYPO3\CMS\Core\Utility\GeneralUtility::devLog('initRecords User is not allowed to view table: ' . $this->table, COMMERCE_EXTKEY, 3);
}
return;
}
// Store the position Uids
$this->getPositionsByIndices($index, $parentIndices);
// Get the uids of the open parent - returns uids which are currently open
$recordUids = $parentLeafData->getRecordsUids();
if ($recordUids == null) {
return;
}
// Read all items
if ($this->useMMTable) {
$this->where['uid_foreign'] = implode(',', $recordUids);
$this->where['uid_local'] = 0;
} else {
$this->where[$this->itemParentField] = implode(',', $recordUids);
$this->where['uid'] = 0;
}
$this->records = $this->loadRecords();
}
示例12: processRequest
/**
* Starts the execution of a frontend helper.
*
* @param Tx_Solr_IndexQueue_PageIndexerRequest $request Page indexer request
* @param Tx_Solr_IndexQueue_PageIndexerResponse $response Page indexer response
*/
public function processRequest(Tx_Solr_IndexQueue_PageIndexerRequest $request, Tx_Solr_IndexQueue_PageIndexerResponse $response)
{
$this->request = $request;
$this->response = $response;
if ($request->getParameter('loggingEnabled')) {
GeneralUtility::devLog('Page indexer request received', 'solr', 0, array('request' => (array) $request));
}
}
示例13: showAction
/**
* Show the content of the update script (if any).
*
* @param string $extensionKey Extension key
* @return void
* @throws \TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException
*/
public function showAction($extensionKey)
{
\TYPO3\CMS\Core\Utility\GeneralUtility::devLog('Request for update script', 'extensionmanager', 0, $extensionKey);
/** @var $updateScriptUtility \TYPO3\CMS\Extensionmanager\Utility\UpdateScriptUtility */
$updateScriptUtility = $this->objectManager->get(\TYPO3\CMS\Extensionmanager\Utility\UpdateScriptUtility::class);
$updateScriptResult = $updateScriptUtility->executeUpdateIfNeeded($extensionKey);
$this->view->assign('updateScriptResult', $updateScriptResult)->assign('extensionKey', $extensionKey);
}
示例14: log
/**
* Logs a message and optionally data to devlog
*
* @param string $message Log message
* @param array $data Optional data
* @return void
*/
protected function log($message, array $data = array())
{
// TODO refactor to have logger injected
if (!$this->configuration['logging']) {
return;
}
GeneralUtility::devLog($message, 'tika', 0, $data);
}
示例15: extractContentMarkedForIndexing
/**
* Extracts the markup wrapped with TYPO3SEARCH_begin and TYPO3SEARCH_end
* markers.
*
* @param string $html HTML markup with TYPO3SEARCH markers for content that should be indexed
* @return string HTML markup found between TYPO3SEARCH markers
*/
protected function extractContentMarkedForIndexing($html)
{
preg_match_all('/<!--\\s*?TYPO3SEARCH_begin\\s*?-->.*?<!--\\s*?TYPO3SEARCH_end\\s*?-->/mis', $html, $indexableContents);
$indexableContent = implode($indexableContents[0], '');
if (empty($indexableContent) && $GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_solr.']['logging.']['indexing.']['missingTypo3SearchMarkers']) {
GeneralUtility::devLog('No TYPO3SEARCH markers found.', 'solr', 2);
}
return $indexableContent;
}