FluidTYPO3\Flux\Service\FluxService::message PHP Method

message() public method

public message ( string $message, integer $severity = GeneralUtility::SYSLOG_SEVERITY_INFO, string $title = 'Flux Debug' ) : void
$message string
$severity integer
$title string
return void
    public function message($message, $severity = GeneralUtility::SYSLOG_SEVERITY_INFO, $title = 'Flux Debug')
    {
        $hash = $message . $severity;
        $disabledDebugMode = (bool) (1 < $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['flux']['setup']['debugMode']);
        $alreadySent = TRUE === isset($this->sentDebugMessages[$hash]);
        $shouldExcludedFriendlySeverities = 2 == $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['flux']['setup']['debugMode'];
        $isExcludedSeverity = TRUE === $shouldExcludedFriendlySeverities && TRUE === in_array($severity, self::$friendlySeverities);
        if (FALSE === $disabledDebugMode && FALSE === $alreadySent && FALSE === $isExcludedSeverity) {
            $this->logMessage($message, $severity);
            $this->sentDebugMessages[$hash] = TRUE;
        }
    }

Usage Example

 /**
  * Get a variable stored in the Fluid template
  * @param string $viewHelperClassName Class name of the ViewHelper which stored the variable
  * @param string $name Name of the variable which the ViewHelper stored
  * @param string $sectionName Optional name of a section in which the ViewHelper was called
  * @return mixed
  * @throws \RuntimeException
  */
 protected function getStoredVariable($viewHelperClassName, $name, $sectionName = NULL)
 {
     if (FALSE === $this->controllerContext instanceof ControllerContext) {
         throw new \RuntimeException('ExposedTemplateView->getStoredVariable requires a ControllerContext, none exists (getStoredVariable method)', 1343521593);
     }
     $this->baseRenderingContext->setControllerContext($this->controllerContext);
     $this->templateParser->setConfiguration($this->buildParserConfiguration());
     $parsedTemplate = $this->getParsedTemplate();
     $this->startRendering(AbstractTemplateView::RENDERING_TEMPLATE, $parsedTemplate, $this->baseRenderingContext);
     if (FALSE === empty($sectionName)) {
         $this->renderSection($sectionName, $this->baseRenderingContext->getTemplateVariableContainer()->getAll());
     } else {
         $this->render();
     }
     $this->stopRendering();
     if (FALSE === $this->baseRenderingContext->getViewHelperVariableContainer()->exists($viewHelperClassName, $name)) {
         return NULL;
     }
     $stored = $this->baseRenderingContext->getViewHelperVariableContainer()->get($viewHelperClassName, $name);
     $templateIdentityForLog = NULL !== $this->templateSource ? 'source code with hash value ' . sha1($this->templateSource) : $this->getTemplatePathAndFilename();
     $this->configurationService->message('Flux View ' . get_class($this) . ' is able to read stored configuration from ' . $templateIdentityForLog, GeneralUtility::SYSLOG_SEVERITY_INFO);
     return $stored;
 }
All Usage Examples Of FluidTYPO3\Flux\Service\FluxService::message