diff --git a/src/Controller/Component.php b/src/Controller/Component.php index 92aea5b..39308a8 100644 --- a/src/Controller/Component.php +++ b/src/Controller/Component.php @@ -219,7 +219,7 @@ class Component /** * Генерация интерфейса для выбора галлереи фотографии */ - public function setParameters($view/*: Composite*/, $options = null) + public function setParameters(Composite $view, $options = null) { $form = new Form(); diff --git a/src/Form/Select.php b/src/Form/Select.php index 3a4ec2c..44d26f4 100644 --- a/src/Form/Select.php +++ b/src/Form/Select.php @@ -8,7 +8,7 @@ class Select extends Field public $options = array(); public function __construct ($input, $factory) { - parent::__construct($input, $factory); + parent::__construct($input); if ($factory != null) { $factory->create($this, $input); diff --git a/src/View/Plain.php b/src/View/Plain.php index fae072c..5ffb102 100644 --- a/src/View/Plain.php +++ b/src/View/Plain.php @@ -8,7 +8,7 @@ */ namespace ctiso\View; -class Plain +class Plain extends \stdClass { protected $document; protected $values = array(); diff --git a/src/View/Top.php b/src/View/Top.php index f27e44e..4779624 100644 --- a/src/View/Top.php +++ b/src/View/Top.php @@ -28,32 +28,6 @@ class Top extends Composite return false; } - private function groupFiles(array $list, $debugMode = true) - { - $debug = ($debugMode) ? 'debug=1' : ''; - $path = parse_url($this->config->get('system', 'web'), PHP_URL_PATH); - - $groups = array(); - $use = array(); - - $result = array(); - foreach ($list as $file) { - $name = $this->findGroup($groups, $file); - if ($name) { - $use[$name] = 1; - } else { - $result[] = $file; - } - } - $list = array(); - foreach ($use as $name => $value) { - $list[] = $groups[$name]; - } - - return array_merge($list, $result); - } - - function getId($pref) { $this->mid++; @@ -72,8 +46,8 @@ class Top extends Composite // Скрипты и стили $this->set('scriptstring', $this->getScriptRaw()); - $this->set('scripts', array_unique($this->groupFiles($this->getScripts(), false))); - $this->set('stylesheet', array_unique($this->groupFiles($this->getStyleSheet(), false))); + $this->set('scripts', array_unique($this->getScripts())); + $this->set('stylesheet', array_unique($this->getStyleSheet())); $this->require = array('admin' => 'ma'); $this->deps = array();