$this->MyForm = $this->Form->App->CreateForm($this->FormName,$options); array_pop($this->Form->App->_forms); $this->MyForm->Init(); } else if ($this->ThrowException) { if (YII_DEBUG) Creo::ThrowException(new CreoException('Form "'.$this->Form->Name.'"'.' frame "'.$this->Name.'" property "FormName" not defined')); else Creo::ThrowException(new CreoException('Page not found',404)); } if (Creo::$Status == CreoConst::$StatusUserError && CreoUtils::Assigned($this->ErrorForm && !$this->ThrowException)) { $this->FormName = $this->ErrorForm; $this->MyForm = $this->Form->App->CreateForm($this->FormName); array_pop($this->Form->App->_forms);
public function Init() { if ($this->Enabled && $this->SystemManualInit === false) { $this->Attr['id'] = $this->Name; $this->AddAssets(); $this->InitBody(); $this->_init_count++; } } public function ManualInit()
if (!$post_process) { $this->DispatchEvent('OnGetData',$this->OnGetData); $this->GetDBParamValue(); } parent::Init(); if ($this->Enabled) { if ($this->_init_count == 1) { $this->_CreateClassAttr();
} public function Init() { if ($this->SystemManualInit === false) { parent::Init(); if ($this->Enabled) { for ($i = 0; $i < count($this->Elements) ; $i++) { $this->Elements[$i]->Init(); $this->Elements[$i]->DispatchEvent('OnAfterInit',$this->Elements[$i]->OnAfterInit);
{ parent::Init(); if ($this->Enabled) { for ($i = 0; $i < count($this->Elements) ; $i++) { $this->Elements[$i]->Init(); $this->Elements[$i]->DispatchEvent('OnAfterInit',$this->Elements[$i]->OnAfterInit); } } if (!CreoUtils::Assigned($this->Owner)) $this->DispatchEvent('OnAfterInit',$this->OnAfterInit);
{ if ($this->SystemManualInit === false) { if ($this->_init_count == 0) $this->AddClass('form-w'); parent::Init(); if ($this->Enabled) { if ($this->FormAutocomplete) $this->Attr['autocomplete'] = 'on';
$this->PostForm(); if (CreoUtils::Assigned($this->Controller)) $this->Controller->runAction('init',[]); if (CreoUtils::Assigned($this->View)) $this->View->Init(); } public function Render() { if (CreoUtils::Assigned($this->Controller)) $this->Controller->runAction('render',[]);
$css_file = CreoUtils::ToWebDir(dirname($this->File).'/css/default/skin_default.css'); if (file_exists($css_file)) Creo::AddCssFile(CreoUtils::ToWebPath($css_file)); for ($i = 0; $i < count($this->_forms) ; $i++) { $this->_forms[$i]->Init(); } if (Creo::$Mode == CreoConst::$StdMode) CreoTranslate::ComponentExport($this); }
$target_controller->runAction('before'.Creo::$Request['target']['action'],[]); } } parent::Init(); if (CreoUtils::Assigned($this->MainController)) $this->MainController->runAction('init',[]);
$allow_run = CreoUsers::CheckPermission($perm); } if ($allow_run) { static::ExecHook('BeforeTargetAppInit'); static::$App->Init(); } else { $_POST['referer'] = static::$TargetAppName; $_POST['permission'] = $perm; static::ToggleApplication(static::$Params['login_app']);
static::ThrowException(new CreoException('Decode request error')); break; } static::ExecHook('AfterTargetAppNameProcess'); static::CreateApplication(static::$TargetAppName); static::_user_auto_load(); static::$YController->layout = CreoLayout::GetName(); static::AddHookCallback('AfterRenderCreoLayout',['static_class_name'=>'self','func_name'=>'HookAfterRenderCreoLayout']);
class CreoController extends Controller { public function actionIndex() { include(__DIR__ . '/../vendor/creo/creo_starter.php'); return Creo::Start($this); } }
$args = $this->controller->bindActionParams($this, $params); Yii::trace('Running action: ' . get_class($this->controller) . '::' . $this->actionMethod . '()', __METHOD__); if (Yii::$app->requestedParams === null) { Yii::$app->requestedParams = $args; } return call_user_func_array([$this->controller, $this->actionMethod], $args); } }
} $result = null; if ($runAction && $this->beforeAction($action)) { // run the action $result = $action->runWithParams($params); $result = $this->afterAction($action, $result); // call afterAction on modules foreach ($modules as $module) { /* @var $module Module */
$parts = $this->createController($route); if (is_array($parts)) { /* @var $controller Controller */ list($controller, $actionID) = $parts; $oldController = Yii::$app->controller; Yii::$app->controller = $controller; $result = $controller->runAction($actionID, $params); if ($oldController !== null) { Yii::$app->controller = $oldController; } return $result; } else {
unset($params[0]); } try { //$route = 'creo'; //gr-s@mail.ru Yii::trace("Route requested: '$route'", __METHOD__); $this->requestedRoute = $route; $result = $this->runAction($route, $params); if ($result instanceof Response) { return $result; } else { $response = $this->getResponse(); if ($result !== null) { $response->data = $result;
try { $this->state = self::STATE_BEFORE_REQUEST; $this->trigger(self::EVENT_BEFORE_REQUEST); $this->state = self::STATE_HANDLING_REQUEST; $response = $this->handleRequest($this->getRequest()); $this->state = self::STATE_AFTER_REQUEST; $this->trigger(self::EVENT_AFTER_REQUEST); $this->state = self::STATE_SENDING_RESPONSE; $response->send();
require(__DIR__ . '/../vendor/autoload.php'); require(__DIR__ . '/../vendor/yiisoft/yii2/Yii.php'); $config = require(__DIR__ . '/../config/web.php'); (new yii\web\Application($config))->run();
$_GET = [ 'p0' => 'lyuks_mb2', ];