| 1 | <?php |
||
| 11 | abstract class Entity |
||
| 12 | { |
||
| 13 | protected $app; |
||
| 14 | protected $formats = [ |
||
| 15 | 'text/html' => 'html', |
||
| 16 | 'application/json' => 'json', |
||
| 17 | ]; |
||
| 18 | |||
| 19 | public function __construct(Admin $app) |
||
| 23 | |||
| 24 | public function __invoke(Request $request) |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Helper to build the entity form. |
||
| 39 | * |
||
| 40 | * @param string $entityName |
||
| 41 | * @param mixed|null $id |
||
| 42 | * |
||
| 43 | * return \Folk\Formats\Form |
||
| 44 | */ |
||
| 45 | protected function createForm(string $entityName, $id = null) |
||
| 63 | } |
||
| 64 |