Neos\Fusion\Core\Runtime::evaluate PHP Метод

evaluate() публичный Метод

Evaluate an absolute TypoScript path and return the result
public evaluate ( string $typoScriptPath, object $contextObject = null ) : mixed
$typoScriptPath string
$contextObject object the object available as "this" in Eel expressions. ONLY FOR INTERNAL USE!
Результат mixed the result of the evaluation, can be a string but also other data types
    public function evaluate($typoScriptPath, $contextObject = null)
    {
        return $this->evaluateInternal($typoScriptPath, self::BEHAVIOR_RETURNNULL, $contextObject);
    }

Usage Example

Пример #1
0
 /**
  * Return the TypoScript value relative to this TypoScript object (with processors etc applied).
  *
  * Note that subsequent calls of tsValue() with the same TypoScript path will return the same values since the
  * first evaluated value will be cached in memory.
  *
  * @param string $path
  * @return mixed
  */
 protected function tsValue($path)
 {
     $fullPath = $this->path . '/' . $path;
     if (!isset($this->tsValueCache[$fullPath])) {
         $this->tsValueCache[$fullPath] = $this->tsRuntime->evaluate($fullPath, $this);
     }
     return $this->tsValueCache[$fullPath];
 }
All Usage Examples Of Neos\Fusion\Core\Runtime::evaluate