|
|
@@ -1292,6 +1292,7 @@ class View implements EventDispatcherInterface
|
|
|
'plugin' => 'setPlugin',
|
|
|
'name' => 'setName',
|
|
|
'elementCache' => 'setElementCache',
|
|
|
+ 'hasRendered' => 'resetHasRendered',
|
|
|
];
|
|
|
if (isset($protected[$name])) {
|
|
|
$method = $protected[$name];
|
|
|
@@ -1442,6 +1443,19 @@ class View implements EventDispatcherInterface
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * Reset $hadRendered property to false to allow running render() again.
|
|
|
+ *
|
|
|
+ * @return $this
|
|
|
+ * @since 3.7.0
|
|
|
+ */
|
|
|
+ public function resetHasRendered()
|
|
|
+ {
|
|
|
+ $this->hasRendered = false;
|
|
|
+
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
* Set sub-directory for this template files.
|
|
|
*
|
|
|
* @param string $subDir Sub-directory name.
|