23 lines
565 B
PHP
Raw Normal View History

2021-05-22 11:02:45 +08:00
<?php
namespace catchAdmin\cms\tables\forms;
use catchAdmin\cms\model\Category as CategoryModel;
use catchAdmin\cms\support\DynamicFormFields;
use catcher\library\form\Form;
2021-05-23 20:35:21 +08:00
use catcher\Utils;
2021-05-22 11:02:45 +08:00
abstract class BaseForm extends Form
{
protected $table = null;
public function create(): array
{
$fields = parent::create(); // TODO: Change the autogenerated stub
if ($this->table) {
2021-05-23 20:35:21 +08:00
return array_merge($fields, (new DynamicFormFields())->build(Utils::tableWithPrefix($this->table)));
2021-05-22 11:02:45 +08:00
}
return $fields;
}
}