| 1 | <?php |
||
| 18 | abstract class CreateElement extends Action |
||
| 19 | { |
||
| 20 | use SaveElementTrait; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @inheritdoc |
||
| 24 | * @return ElementInterface |
||
| 25 | */ |
||
| 26 | abstract protected function newElement(array $config = []): ElementInterface; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @inheritdoc |
||
| 30 | * @return ElementInterface |
||
| 31 | * @throws \Throwable |
||
| 32 | * @throws \craft\errors\ElementNotFoundException |
||
| 33 | * @throws \yii\base\Exception |
||
| 34 | * @throws \yii\web\HttpException |
||
| 35 | * @throws \yii\web\UnauthorizedHttpException |
||
| 36 | */ |
||
| 37 | public function run() |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @inheritdoc |
||
| 44 | */ |
||
| 45 | public function statusCodeSuccess(): int |
||
| 49 | } |
||
| 50 |