Beispiel #1
0
 /**
  * Returns the static model of the specified AR class.
  * @param string $className active record class name.
  * @return Object the static model class
  */
 public static function model($className = __CLASS__)
 {
     return parent::model($className);
 }
Beispiel #2
0
 public function loadModelOr404($modelClass, $pk, $notFoundMessage = 'Запрашиваемая страница не найдена.')
 {
     $model = DaActiveRecord::model($modelClass)->findByPk($pk);
     return $this->throw404IfNull($model, $notFoundMessage);
 }