yii\base\View::renderDynamic PHP Метод

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

This method is mainly used together with content caching (fragment caching and page caching) when some portions of the content (called *dynamic content*) should not be cached. The dynamic content must be returned by some PHP statements.
public renderDynamic ( string $statements ) : string
$statements string the PHP statements for generating the dynamic content.
Результат string the placeholder of the dynamic content, or the dynamic content if there is no active content cache currently.
    public function renderDynamic($statements)
    {
        if (!empty($this->cacheStack)) {
            $n = count($this->dynamicPlaceholders);
            $placeholder = "<![CDATA[YII-DYNAMIC-{$n}]]>";
            $this->addDynamicPlaceholder($placeholder, $statements);
            return $placeholder;
        } else {
            return $this->evaluateDynamicContent($statements);
        }
    }