run() public method

Displays a model.
public run ( string $id ) : yii\db\ActiveRecordInterface
$id string the primary key of the model.
return yii\db\ActiveRecordInterface the model being displayed
Esempio n. 1
0
 public function run($id)
 {
     $model = parent::run($id);
     foreach ($this->controller->getFilters() as $column => $value) {
         if ($model->{$column} != $value) {
             throw new NotFoundHttpException("Object not found: {$id}");
         }
     }
     return $model;
 }
Esempio n. 2
0
 public function run($id)
 {
     return parent::run($id);
 }
Esempio n. 3
0
 /**
  * @inheritdoc
  */
 public function run()
 {
     return parent::run(null);
 }