Merge branch 'master' of http://gitlab.edu.yar.ru/composer/PHP_Library
This commit is contained in:
commit
b82d93905a
3 changed files with 8 additions and 4 deletions
|
|
@ -336,6 +336,7 @@ class Controller_Action
|
|||
$node->make($this);
|
||||
$this->view->setView($name, $node->view);
|
||||
}
|
||||
|
||||
foreach ($this->childViews as $name => $node) {
|
||||
$this->view->setView($name, $node);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,6 +74,9 @@ class View_Top extends View_Composite {
|
|||
|
||||
$startup = array();
|
||||
foreach($this->_section as $s) {
|
||||
if (is_string($s)) {
|
||||
continue;
|
||||
}
|
||||
$module = explode('_', $s->active_module, 2);
|
||||
if (count($module) < 2) {
|
||||
continue;
|
||||
|
|
@ -106,7 +109,6 @@ class View_Top extends View_Composite {
|
|||
|
||||
$script .= $value . ".execute('" . $s->module_action . "', " . json_encode($init) .");\n";
|
||||
$startup[] = $script;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
<?php
|
||||
|
||||
// View_Top => View_Base + View_List + View_Template
|
||||
class View_View
|
||||
{
|
||||
protected $_section = array(); // Вложенные шаблоны
|
||||
|
|
@ -31,11 +30,13 @@ class View_View
|
|||
* @param string $section переменная шаблона
|
||||
* @param CompositeView $view вложенный шаблон
|
||||
*/
|
||||
public function setView($section, View_View $view)
|
||||
public function setView($section, /*View_View|string*/ $view)
|
||||
{
|
||||
$this->_section [$section] = $view;
|
||||
if (is_object($view)) {
|
||||
$view->parent_view = $this;
|
||||
}
|
||||
}
|
||||
|
||||
public function assignValues($values)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue