LetterStringGroup::model PHP Method

model() public static method

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

Usage Example

Esempio n. 1
0
 /**
  * Edits or adds a snippets.
  *
  * @param bool|int $id
  *
  * @throws CHttpException
  */
 public function actionEdit($id = false)
 {
     if ($id) {
         $this->admin->setModelId($id);
     }
     $this->admin->setEditFields(array('site_id' => array('widget' => 'DropDownList', 'options' => CHtml::listData(Institution::model()->getCurrent()->sites, 'id', 'short_name'), 'default' => Yii::app()->request->getParam('site_id'), 'htmlOptions' => null, 'hidden' => false, 'layoutColumns' => null), 'letter_string_group_id' => array('widget' => 'DropDownList', 'options' => CHtml::listData(LetterStringGroup::model()->findAll(), 'id', 'name'), 'default' => Yii::app()->request->getParam('group_id'), 'htmlOptions' => null, 'hidden' => false, 'layoutColumns' => null), 'name' => 'text', 'body' => array('widget' => 'CustomView', 'viewName' => '//admin/generic/shortcodeText', 'viewArguments' => array('model' => $this->admin->getModel())), 'event_type' => array('widget' => 'DropDownList', 'options' => CHtml::listData(EventType::model()->findAll(), 'class_name', 'name'), 'htmlOptions' => array('empty' => '- Select -'), 'hidden' => false, 'layoutColumns' => null), 'element_type' => array('widget' => 'DropDownList', 'options' => CHtml::listData(ElementType::model()->findAll(), 'class_name', 'name'), 'htmlOptions' => array('empty' => '- Select -'), 'hidden' => false, 'layoutColumns' => null)));
     $this->admin->editModel();
 }
All Usage Examples Of LetterStringGroup::model