Skip to content
PHP Ecosystem
Explore

DynamicContentAwareInterface

API reference › yii › base › DynamicContentAwareInterface

interfaceyii\base\DynamicContentAwareInterface
Since2.0.14
Sourceframework/base/DynamicContentAwareInterface.php
Implemented by 3 types

DynamicContentAwareInterface is the interface that should be implemented by classes which support a View dynamic content feature.

MethodDescriptionDefined by
addDynamicPlaceholder() abstractAdds a placeholder for dynamic content.DynamicContentAwareInterface
getDynamicPlaceholders() abstractReturns a list of placeholders for dynamic content. This method is used internally to implement the content caching feature.DynamicContentAwareInterface
setDynamicPlaceholders() abstractSets a list of placeholders for dynamic content. This method is used internally to implement the content caching feature.DynamicContentAwareInterface
abstract public function addDynamicPlaceholder(string $name, string $statements): mixed

Adds a placeholder for dynamic content.

This method is used internally to implement the content caching feature.

Parameters

ParameterTypeDescription
$namestringThe placeholder name.
$statementsstringThe PHP statements for generating the dynamic content.

Returns

mixed

abstract public function getDynamicPlaceholders(): array

Returns a list of placeholders for dynamic content. This method is used internally to implement the content caching feature.

Returns

array: A list of placeholders.

abstract public function setDynamicPlaceholders(array $placeholders): mixed

Sets a list of placeholders for dynamic content. This method is used internally to implement the content caching feature.

Parameters

ParameterTypeDescription
$placeholdersarrayA list of placeholders.

Returns

mixed