DynamicContentAwareInterface
API reference › yii › base › DynamicContentAwareInterface
Implemented by 3 types
DynamicContentAwareInterface is the interface that should be implemented by classes
which support a View dynamic content feature.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
addDynamicPlaceholder() abstract | Adds a placeholder for dynamic content. | DynamicContentAwareInterface |
getDynamicPlaceholders() abstract | Returns a list of placeholders for dynamic content. This method is used internally to implement the content caching feature. | DynamicContentAwareInterface |
setDynamicPlaceholders() abstract | Sets a list of placeholders for dynamic content. This method is used internally to implement the content caching feature. | DynamicContentAwareInterface |
Method details
Section titled “Method details”addDynamicPlaceholder()
Section titled “addDynamicPlaceholder() ”abstract public function addDynamicPlaceholder(string $name, string $statements): mixedAdds a placeholder for dynamic content.
This method is used internally to implement the content caching feature.
Parameters
| Parameter | Type | Description |
|---|---|---|
$name | string | The placeholder name. |
$statements | string | The PHP statements for generating the dynamic content. |
Returns
mixed
getDynamicPlaceholders()
Section titled “getDynamicPlaceholders() ”abstract public function getDynamicPlaceholders(): arrayReturns a list of placeholders for dynamic content. This method is used internally to implement the content caching feature.
Returns
array: A list of placeholders.
setDynamicPlaceholders()
Section titled “setDynamicPlaceholders() ”abstract public function setDynamicPlaceholders(array $placeholders): mixedSets a list of placeholders for dynamic content. This method is used internally to implement the content caching feature.
Parameters
| Parameter | Type | Description |
|---|---|---|
$placeholders | array | A list of placeholders. |
Returns
mixed