1 | <?php namespace Anomaly\UsersModule\Http\Controller\Admin; |
||
20 | class FieldsController extends AdminController |
||
21 | { |
||
22 | |||
23 | /** |
||
24 | * Return an index of existing fields. |
||
25 | * |
||
26 | * @param FieldTableBuilder $table |
||
27 | * @return \Symfony\Component\HttpFoundation\Response |
||
28 | */ |
||
29 | public function index(AssignmentTableBuilder $table, UserModel $users) |
||
30 | { |
||
31 | $table->setOption('sortable', true)->setStream($users->getStream()); |
||
32 | |||
33 | return $table->render(); |
||
34 | } |
||
35 | |||
36 | /** |
||
37 | * Choose a field type for creating a field. |
||
38 | * |
||
39 | * @param FieldTypeCollection $fieldTypes |
||
40 | * @return \Illuminate\View\View |
||
41 | */ |
||
42 | public function choose(FieldTypeCollection $fieldTypes) |
||
46 | |||
47 | /** |
||
48 | * Return the form for a new field. |
||
49 | * |
||
50 | * @param FieldFormBuilder $form |
||
51 | * @param UserModel $users |
||
52 | * @param FieldTypeCollection $fieldTypes |
||
53 | * @return \Symfony\Component\HttpFoundation\Response |
||
54 | */ |
||
55 | public function create(FieldFormBuilder $form, UserModel $users, FieldTypeCollection $fieldTypes) |
||
64 | |||
65 | /** |
||
66 | * Return a form to edit the field. |
||
67 | * |
||
68 | * @param AssignmentRepositoryInterface $assignments |
||
69 | * @param FieldFormBuilder $form |
||
70 | * @param UserModel $model |
||
71 | * @param $id |
||
72 | * @return \Symfony\Component\HttpFoundation\Response |
||
73 | */ |
||
74 | public function edit(AssignmentRepositoryInterface $assignments, FieldFormBuilder $form, UserModel $model, $id) |
||
83 | } |
||
84 |