mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 02:26:17 +00:00
Moving loadConfig to Html helper.
This commit is contained in:
parent
b1f4c6a0c9
commit
7df9782020
2 changed files with 16 additions and 16 deletions
|
@ -174,22 +174,6 @@ class Helper extends Object {
|
|||
return $this->{$name} = $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses tag templates into $this->tags.
|
||||
*
|
||||
* @param $name file name inside app/config to load.
|
||||
* @return array merged tags from config/$name.php
|
||||
*/
|
||||
public function loadConfig($name = 'tags') {
|
||||
if (file_exists(CONFIGS . $name .'.php')) {
|
||||
require(CONFIGS . $name .'.php');
|
||||
if (isset($tags)) {
|
||||
$this->tags = array_merge($this->tags, $tags);
|
||||
}
|
||||
}
|
||||
return $this->tags;
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds URL for specified action.
|
||||
*
|
||||
|
|
|
@ -905,6 +905,22 @@ class HtmlHelper extends AppHelper {
|
|||
return $out;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses tag templates into $this->tags.
|
||||
*
|
||||
* @param $name file name inside app/config to load.
|
||||
* @return array merged tags from config/$name.php
|
||||
*/
|
||||
public function loadConfig($name = 'tags') {
|
||||
if (file_exists(CONFIGS . $name .'.php')) {
|
||||
require(CONFIGS . $name .'.php');
|
||||
if (isset($tags)) {
|
||||
$this->_tags = array_merge($this->_tags, $tags);
|
||||
}
|
||||
}
|
||||
return $this->_tags;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a space-delimited string with items of the $options array. If a
|
||||
* key of $options array happens to be one of:
|
||||
|
|
Loading…
Add table
Reference in a new issue