| | |
| | | |
| | | class Fields { |
| | | protected array $fields; |
| | | protected Registrar $registrar; |
| | | private Registrar $registrar; |
| | | |
| | | public function __construct(?string $type = null, ?Registrar $registrar = null) { |
| | | $this->registrar = $registrar; |
| | |
| | | ]; |
| | | } |
| | | $fields = [ |
| | | 'post_status' => [ |
| | | 'type' => 'radio', |
| | | 'label' => 'Status', |
| | | 'default' => 'draft', |
| | | 'options' => $statuses |
| | | ], |
| | | 'post_thumbnail' => [ |
| | | 'type' => 'upload', |
| | | 'subtype' => 'image', |
| | |
| | | 'type' => 'datetime', |
| | | 'label' => 'Date', |
| | | ], |
| | | 'post_modified' => [ |
| | | 'type' => 'datetime', |
| | | 'label' => 'Date Modified', |
| | | 'hidden' => true, |
| | | ], |
| | | 'post_content' => [ |
| | | 'type' => 'textarea', |
| | | 'quill' => true, |
| | |
| | | 'label' => 'TLDR', |
| | | 'maxLength' => 158, |
| | | ], |
| | | 'post_status' => [ |
| | | 'type' => 'radio', |
| | | 'label' => 'Status', |
| | | 'default' => 'draft', |
| | | 'options' => $statuses |
| | | ] |
| | | ]; |
| | | |
| | | foreach ($fields as $name => $config) { |