initActionView() protected method

Sets the the css state.
protected initActionView ( )
示例#1
0
 public function initActionView()
 {
     parent::initActionView();
     if (@$_GET['comment']) {
         $this->show_comment_form = true;
     }
 }
示例#2
0
 /**
  * Sets the title for the event display.
  */
 public function initActionView()
 {
     parent::initActionView();
     $this->setTitle($this->getManager()->getTitle($this->event));
     $this->jsVars['cvi_print_url'] = $this->getApp()->createUrl($this->getModule()->name . '/default/PDFprint/' . $this->event->id);
     $this->jsVars['label_print_url'] = $this->getApp()->createUrl($this->getModule()->name . '/default/LabelPDFprint/' . $this->event->id);
     if ($this->getApp()->request->getParam('print', null) == 1) {
         $this->jsVars['cvi_do_print'] = 1;
     }
 }
示例#3
0
 /**
  * Set up some js vars.
  */
 public function initActionView()
 {
     parent::initActionView();
     $this->jsVars['correspondence_markprinted_url'] = Yii::app()->createUrl('OphCoCorrespondence/Default/markPrinted/' . $this->event->id);
     $this->jsVars['correspondence_print_url'] = Yii::app()->createUrl('OphCoCorrespondence/Default/print/' . $this->event->id);
 }
示例#4
0
 /**
  * Some additional initialisation for view.
  */
 protected function initActionView()
 {
     parent::initActionView();
     // Clear any stale warning
     Yii::app()->user->getFlash('warning.prescription_allergy');
     // set required js variables
     $cs = Yii::app()->getClientScript();
     $cs->registerScript('scr_prescription_view', "prescription_print_url = '" . Yii::app()->createUrl('/OphDrPrescription/default/print/' . $this->event->id) . "';\n", CClientScript::POS_READY);
     // Get prescription details element
     $element = Element_OphDrPrescription_Details::model()->findByAttributes(array('event_id' => $this->event->id));
     foreach ($element->items as $item) {
         if ($this->patient->hasDrugAllergy($item->drug_id)) {
             $this->showAllergyWarning();
             break;
         }
     }
 }