|
|
@@ -254,13 +254,6 @@ class View extends Object {
|
|
|
protected $_paths = array();
|
|
|
|
|
|
/**
|
|
|
- * Indicate that helpers have been loaded.
|
|
|
- *
|
|
|
- * @var boolean
|
|
|
- */
|
|
|
- protected $_helpersLoaded = false;
|
|
|
-
|
|
|
-/**
|
|
|
* The names of views and their parents used with View::extend();
|
|
|
*
|
|
|
* @var array
|
|
|
@@ -347,6 +340,7 @@ class View extends Object {
|
|
|
}
|
|
|
$this->Helpers = new HelperCollection($this);
|
|
|
$this->Blocks = new ViewBlock();
|
|
|
+ $this->loadHelpers();
|
|
|
parent::__construct();
|
|
|
}
|
|
|
|
|
|
@@ -460,9 +454,6 @@ class View extends Object {
|
|
|
if ($this->hasRendered) {
|
|
|
return true;
|
|
|
}
|
|
|
- if (!$this->_helpersLoaded) {
|
|
|
- $this->loadHelpers();
|
|
|
- }
|
|
|
$this->Blocks->set('content', '');
|
|
|
|
|
|
if ($view !== false && $viewFileName = $this->_getViewFileName($view)) {
|
|
|
@@ -511,9 +502,6 @@ class View extends Object {
|
|
|
return $this->Blocks->get('content');
|
|
|
}
|
|
|
|
|
|
- if (!$this->_helpersLoaded) {
|
|
|
- $this->loadHelpers();
|
|
|
- }
|
|
|
if (empty($content)) {
|
|
|
$content = $this->Blocks->get('content');
|
|
|
}
|
|
|
@@ -881,7 +869,6 @@ class View extends Object {
|
|
|
list(, $class) = pluginSplit($properties['class']);
|
|
|
$this->{$class} = $this->Helpers->load($properties['class'], $properties['settings']);
|
|
|
}
|
|
|
- $this->_helpersLoaded = true;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -1194,9 +1181,6 @@ class View extends Object {
|
|
|
* @return string
|
|
|
*/
|
|
|
protected function _renderElement($file, $data, $options) {
|
|
|
- if (!$this->_helpersLoaded) {
|
|
|
- $this->loadHelpers();
|
|
|
- }
|
|
|
if ($options['callbacks']) {
|
|
|
$this->getEventManager()->dispatch(new CakeEvent('View.beforeRender', $this, array($file)));
|
|
|
}
|