Moving loadConfig to Html helper.

This commit is contained in:
Juan Basso 2011-01-23 16:21:17 -02:00
parent b1f4c6a0c9
commit 7df9782020
2 changed files with 16 additions and 16 deletions

View file

@ -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.
*

View file

@ -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: