Institution::model PHP Method

model() public static method

Returns the static model of the specified AR class.
public static model ( $className = __CLASS__ ) : Institution
return Institution the static model class
    public static function model($className = __CLASS__)
    {
        return parent::model($className);
    }

Usage Example

 /**
  * Edits or adds a Procedure.
  *
  * @param bool|int $id
  *
  * @throws CHttpException
  */
 public function actionEdit($id = false)
 {
     if ($id) {
         $this->admin->setModelId($id);
     }
     $this->admin->setEditFields(array('name' => 'text', 'siteLetterStrings' => array('widget' => 'RelationList', 'relation' => 'siteLetterStrings', 'action' => 'OphCoCorrespondence/oeadmin/snippet', 'search' => array('site_id' => array('type' => 'dropdown', 'options' => CHtml::listData(Institution::model()->getCurrent()->sites, 'id', 'short_name'), 'default' => Yii::app()->session['selected_site_id'])), 'listFields' => array('display_order', 'name', 'body', 'element_type.name', 'eventTypeName'))));
     $this->admin->editModel();
 }
All Usage Examples Of Institution::model