1 | <?php |
||
13 | class CreateAction extends Action |
||
14 | { |
||
15 | /** |
||
16 | * @var string the scenario to be assigned to the new model before it is validated and saved. |
||
17 | */ |
||
18 | public $scenario = Model::SCENARIO_DEFAULT; |
||
19 | |||
20 | /** |
||
21 | * @var string the name of the view action. This property is need to create the URL when the model is successfully created. |
||
22 | */ |
||
23 | public $viewAction = 'view'; |
||
24 | |||
25 | /** |
||
26 | * Links the relationships with primary model. |
||
27 | * @var callable |
||
28 | */ |
||
29 | public $linkRelationships; |
||
30 | |||
31 | /** |
||
32 | * Creates a new resource. |
||
33 | * @return \yii\db\ActiveRecordInterface the model newly created |
||
34 | * @throws ServerErrorHttpException if there is any error when creating the model |
||
35 | */ |
||
36 | public function run() |
||
61 | } |