/** * Call edit init and set attribute for alerting which side the latest injection management * implies should be injected. * * @see BaseEventTypeController::createInit() */ protected function initActionCreate() { parent::initActionCreate(); $this->editInit(); // set up the injection side if provided by the injection management in examination $exam_api = Yii::app()->moduleAPI->get('OphCiExamination'); // We only want to show the injection mananagement side highlighting from injection management that has // been created on the day of this injection $since = new DateTime(); $since->setTime(0, 0, 0); if ($this->episode && $exam_api && ($imc = $exam_api->getLatestInjectionManagementComplex($this->episode, $since))) { if ($side = $imc->getInjectionSide()) { $this->side_to_inject = $side; } else { $this->side_to_inject = 0; } } }
/** * need to ensure we load the required js. */ public function initActionCreate() { parent::initActionCreate(); $this->_jsCreate(); }
protected function initActionCreate() { parent::initActionCreate(); $this->registerEditScripts(); }
/** * Call editInit to set up jsVars. */ public function initActionCreate() { parent::initActionCreate(); $this->initEdit(); }
/** * Process the booking event value setting. * * @throws Exception */ protected function initActionCreate() { parent::initActionCreate(); if (isset($_GET['booking_event_id'])) { if (!($api = Yii::app()->moduleAPI->get('OphTrOperationbooking'))) { throw new Exception('invalid request for booking event'); } if (!($this->booking_event = Event::model()->findByPk($_GET['booking_event_id'])) || !($this->booking_operation = $api->getOperationForEvent($_GET['booking_event_id']))) { throw new Exception('booking event not found'); } } elseif (isset($_GET['unbooked'])) { $this->unbooked = true; } }
/** * Some additional initialisation for create. */ protected function initActionCreate() { parent::initActionCreate(); $this->initEdit(); }
/** * ensure js vars are set before carrying out standard functionality. */ public function initActionCreate() { $this->addEditJSVars(); parent::initActionCreate(); }