UniqueCodes::model PHP Method

model() public static method

Returns the static model of the specified AR class.
public static model ( $className = __CLASS__ ) : UniqueCodes
return UniqueCodes 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)
 {
     $admin = new Admin(UniqueCodes::model(), $this);
     if ($id) {
         $admin->setModelId($id);
     }
     $admin->setModelDisplayName('Unique Codes');
     $admin->setEditFields(array('code' => 'label', 'active' => 'checkbox'));
     $admin->editModel();
 }
All Usage Examples Of UniqueCodes::model