mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Removing some code duplication.
This commit is contained in:
parent
22fbc24560
commit
052c81774c
1 changed files with 3 additions and 6 deletions
|
@ -667,12 +667,9 @@ class View extends Object {
|
|||
* @return void
|
||||
*/
|
||||
public function loadHelpers() {
|
||||
foreach ($this->helpers as $i => $helper) {
|
||||
$options = array();
|
||||
if (!is_int($i)) {
|
||||
list($options, $helper) = array($helper, $i);
|
||||
}
|
||||
$this->Helpers->load($helper, $options, true);
|
||||
$helpers = HelperCollection::normalizeObjectArray($this->helpers);
|
||||
foreach ($helpers as $name => $properties) {
|
||||
$this->Helpers->load($properties['class'], $properties['settings'], true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue