Добавил namespace и зависимости
This commit is contained in:
parent
e9f7c23990
commit
32ec09a66a
92 changed files with 454 additions and 128 deletions
|
|
@ -1,5 +1,18 @@
|
|||
<?php
|
||||
|
||||
namespace ctiso\Controller;
|
||||
use ctiso\HttpRequest,
|
||||
ctiso\Arr,
|
||||
ctiso\Path,
|
||||
PHPTAL,
|
||||
PHPTAL_PreFilter_Normalize,
|
||||
ctiso\File,
|
||||
ctiso\Form\Form,
|
||||
ctiso\Form\OptionFactory,
|
||||
ctiso\Database,
|
||||
ctiso\Collection,
|
||||
ctiso\Controller\Site;
|
||||
|
||||
function replaceContent($match) {
|
||||
$result = phptal_component(htmlspecialchars_decode($match[3]));
|
||||
return $result;
|
||||
|
|
@ -58,7 +71,7 @@ class FakeTemplate {
|
|||
/**
|
||||
* Класс компонента
|
||||
*/
|
||||
class Controller_Component
|
||||
class Component
|
||||
{
|
||||
public $viewPath = array();
|
||||
public $webPath = array();
|
||||
|
|
@ -210,8 +223,8 @@ class Controller_Component
|
|||
*/
|
||||
public function setParameters(/*.View_Composite.*/$view)
|
||||
{
|
||||
$form = new Form_Form();
|
||||
$options = new Form_OptionFactory($this->db, $this->registry);
|
||||
$form = new Form();
|
||||
$options = new OptionFactory($this->db, $this->registry);
|
||||
|
||||
$settings = $this->getInfo();
|
||||
$form->addFieldList($settings['parameter'], $options);
|
||||
|
|
@ -301,7 +314,7 @@ class Controller_Component
|
|||
$editor = $component->getEditUrl();
|
||||
if ($editor) {
|
||||
if(class_exists("Controller_Site")) { //Если мы в CMS2
|
||||
$instance = Controller_Site::getInstance();
|
||||
$instance = Site::getInstance();
|
||||
$instance->componentsConfig[] = $editor;
|
||||
} else {
|
||||
global $componentsConfig;
|
||||
|
|
@ -356,7 +369,7 @@ class Controller_Component
|
|||
*/
|
||||
|
||||
function addRequireJsPath($name, $path, $shim = null) {
|
||||
Controller_Site::addRequireJsPath($name, $path, $shim);
|
||||
Site::addRequireJsPath($name, $path, $shim);
|
||||
}
|
||||
|
||||
function actionIndex(/*.ComponentRequest.*/ $request) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue