feat: Префикс добавляется автоматически к скриптам и стилям
This commit is contained in:
parent
ad6efaf36d
commit
cab1a44698
2 changed files with 12 additions and 7 deletions
|
|
@ -17,6 +17,7 @@ class View
|
|||
|
||||
public $active_module;
|
||||
public $module_action;
|
||||
public $prefix;
|
||||
|
||||
public $suggestions; //подсказки
|
||||
|
||||
|
|
@ -59,7 +60,7 @@ class View
|
|||
*/
|
||||
public function addScript($name)
|
||||
{
|
||||
$output = $this->resolveName($this->alias, $name);
|
||||
$output = $this->resolveName($this->alias, $name . '?' . http_build_query($this->prefix));
|
||||
$this->_script [] = $output;
|
||||
}
|
||||
|
||||
|
|
@ -77,6 +78,10 @@ class View
|
|||
}
|
||||
}
|
||||
|
||||
public function setPrefix($name, $val) {
|
||||
$this->prefix[$name] = $val;
|
||||
}
|
||||
|
||||
/**
|
||||
* Добавляет стили к текущему шаблону
|
||||
*
|
||||
|
|
@ -84,7 +89,7 @@ class View
|
|||
*/
|
||||
public function addStyleSheet($name)
|
||||
{
|
||||
$output = $this->resolveName($this->alias, $name);
|
||||
$output = $this->resolveName($this->alias, $name . '?' . http_build_query($this->prefix));
|
||||
$this->_stylesheet [] = $output;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue