public function run() { parent::run(); if (!$this->model instanceof ContragentModel) { return null; } if ($this->immutable) { $this->model->setScenario('readonly'); $this->model->getAbstractModel()->setScenario('readonly'); } return $this->render($this->viewFile, ['model' => $this->model, 'customer' => $this->customer, 'immutable' => boolval($this->immutable), 'action' => $this->formAction, 'form' => $this->form, 'additional' => $this->additional]); }