| @@ 32-175 (lines=144) @@ | ||
| 29 | * |
|
| 30 | * @Route("/admin/settings/application") |
|
| 31 | */ |
|
| 32 | class ApplicationController extends AbstractAppController |
|
| 33 | { |
|
| 34 | /** |
|
| 35 | * Lists all Settings entities. |
|
| 36 | * |
|
| 37 | * @Route("/", name="application") |
|
| 38 | * @Method("GET") |
|
| 39 | * @Template() |
|
| 40 | * |
|
| 41 | * @return array |
|
| 42 | */ |
|
| 43 | public function indexAction() |
|
| 44 | { |
|
| 45 | $return = $this->abstractIndexAction('Settings\Settings', 'settings', null); |
|
| 46 | ||
| 47 | return $return; |
|
| 48 | } |
|
| 49 | ||
| 50 | /** |
|
| 51 | * Finds and displays a Settings entity. |
|
| 52 | * |
|
| 53 | * @Route("/{id}/show", name="settings_show", requirements={"id"="\d+"}) |
|
| 54 | * @Method("GET") |
|
| 55 | * @Template() |
|
| 56 | * |
|
| 57 | * @param \App\Entity\Settings\Settings $settings Settings item to display |
|
| 58 | * @return array |
|
| 59 | */ |
|
| 60 | public function showAction(Settings $settings) |
|
| 61 | { |
|
| 62 | $return = $this->abstractShowAction($settings, 'settings'); |
|
| 63 | ||
| 64 | return $return; |
|
| 65 | } |
|
| 66 | ||
| 67 | /** |
|
| 68 | * Displays a form to create a new Settings entity. |
|
| 69 | * |
|
| 70 | * @Route("/new", name="settings_new") |
|
| 71 | * @Method("GET") |
|
| 72 | * @Template() |
|
| 73 | * |
|
| 74 | * @return array |
|
| 75 | */ |
|
| 76 | public function newAction() |
|
| 77 | { |
|
| 78 | $return = $this->abstractNewAction( |
|
| 79 | 'Settings\Settings', |
|
| 80 | 'App\Entity\Settings\Settings', |
|
| 81 | SettingsType::class, |
|
| 82 | 'settings' |
|
| 83 | ); |
|
| 84 | ||
| 85 | return $return; |
|
| 86 | } |
|
| 87 | ||
| 88 | /** |
|
| 89 | * Creates a new Settings entity. |
|
| 90 | * |
|
| 91 | * @Route("/create", name="settings_create") |
|
| 92 | * @Method("POST") |
|
| 93 | * @Template("settings/application/new.html.twig") |
|
| 94 | * |
|
| 95 | * @param \Symfony\Component\HttpFoundation\Request $request Form request |
|
| 96 | * @return array |
|
| 97 | */ |
|
| 98 | public function createAction(Request $request) |
|
| 99 | { |
|
| 100 | $return = $this->abstractCreateAction( |
|
| 101 | $request, |
|
| 102 | 'Settings\Settings', |
|
| 103 | 'App\Entity\Settings\Settings', |
|
| 104 | SettingsType::class, |
|
| 105 | 'settings' |
|
| 106 | ); |
|
| 107 | ||
| 108 | return $return; |
|
| 109 | } |
|
| 110 | ||
| 111 | /** |
|
| 112 | * Displays a form to edit an existing Settings entity. |
|
| 113 | * |
|
| 114 | * @Route("/{id}/edit", name="settings_edit", requirements={"id"="\d+"}) |
|
| 115 | * @Method("GET") |
|
| 116 | * @Template() |
|
| 117 | * |
|
| 118 | * @param \App\Entity\Settings\Settings $settings Settings item to edit |
|
| 119 | * @return array |
|
| 120 | */ |
|
| 121 | public function editAction(Settings $settings) |
|
| 122 | { |
|
| 123 | $return = $this->abstractEditAction( |
|
| 124 | $settings, |
|
| 125 | 'settings', |
|
| 126 | SettingsType::class |
|
| 127 | ); |
|
| 128 | ||
| 129 | return $return; |
|
| 130 | } |
|
| 131 | ||
| 132 | /** |
|
| 133 | * Edits an existing Settings entity. |
|
| 134 | * |
|
| 135 | * @Route("/{id}/update", name="settings_update", requirements={"id"="\d+"}) |
|
| 136 | * @Method("PUT") |
|
| 137 | * @Template("settings/spplication/edit.html.twig") |
|
| 138 | * |
|
| 139 | * @param \App\Entity\Settings\Settings $settings Settings item to update |
|
| 140 | * @param \Symfony\Component\HttpFoundation\Request $request Form request |
|
| 141 | * @return array |
|
| 142 | */ |
|
| 143 | public function updateAction(Settings $settings, Request $request) |
|
| 144 | { |
|
| 145 | $return = $this->abstractUpdateAction( |
|
| 146 | $settings, |
|
| 147 | $request, |
|
| 148 | 'settings', |
|
| 149 | SettingsType::class |
|
| 150 | ); |
|
| 151 | ||
| 152 | return $return; |
|
| 153 | } |
|
| 154 | ||
| 155 | /** |
|
| 156 | * Deletes a Settings entity. |
|
| 157 | * |
|
| 158 | * @Route("/{id}/delete", name="settings_delete", requirements={"id"="\d+"}) |
|
| 159 | * @Method("DELETE") |
|
| 160 | * |
|
| 161 | * @param \App\Entity\Settings\Settings $settings Settings item to delete |
|
| 162 | * @param \Symfony\Component\HttpFoundation\Request $request Form request |
|
| 163 | * @return array |
|
| 164 | */ |
|
| 165 | public function deleteAction(Settings $settings, Request $request) |
|
| 166 | { |
|
| 167 | $this->abstractDeleteAction( |
|
| 168 | $settings, |
|
| 169 | $request, |
|
| 170 | 'settings' |
|
| 171 | ); |
|
| 172 | ||
| 173 | return $this->redirectToRoute('application'); |
|
| 174 | } |
|
| 175 | } |
|
| 176 | ||
| @@ 32-175 (lines=144) @@ | ||
| 29 | * |
|
| 30 | * @Route("/admin/settings/company") |
|
| 31 | */ |
|
| 32 | class CompanyController extends AbstractAppController |
|
| 33 | { |
|
| 34 | /** |
|
| 35 | * Lists all Company entities. |
|
| 36 | * |
|
| 37 | * @Route("/", name="company") |
|
| 38 | * @Method("GET") |
|
| 39 | * @Template() |
|
| 40 | * |
|
| 41 | * @return array |
|
| 42 | */ |
|
| 43 | public function indexAction() |
|
| 44 | { |
|
| 45 | $return = $this->abstractIndexAction('Settings\Company', 'company', null); |
|
| 46 | ||
| 47 | return $return; |
|
| 48 | } |
|
| 49 | ||
| 50 | /** |
|
| 51 | * Finds and displays a Company entity. |
|
| 52 | * |
|
| 53 | * @Route("/{id}/show", name="company_show", requirements={"id"="\d+"}) |
|
| 54 | * @Method("GET") |
|
| 55 | * @Template() |
|
| 56 | * |
|
| 57 | * @param \App\Entity\Settings\Company $company Company item to display |
|
| 58 | * @return array |
|
| 59 | */ |
|
| 60 | public function showAction(Company $company) |
|
| 61 | { |
|
| 62 | $return = $this->abstractShowAction($company, 'company'); |
|
| 63 | ||
| 64 | return $return; |
|
| 65 | } |
|
| 66 | ||
| 67 | /** |
|
| 68 | * Displays a form to create a new Company entity. |
|
| 69 | * |
|
| 70 | * @Route("/new", name="company_new") |
|
| 71 | * @Method("GET") |
|
| 72 | * @Template() |
|
| 73 | * |
|
| 74 | * @return array |
|
| 75 | */ |
|
| 76 | public function newAction() |
|
| 77 | { |
|
| 78 | $return = $this->abstractNewAction( |
|
| 79 | 'Settings\Company', |
|
| 80 | 'App\Entity\Settings\Company', |
|
| 81 | CompanyType::class, |
|
| 82 | 'company' |
|
| 83 | ); |
|
| 84 | ||
| 85 | return $return; |
|
| 86 | } |
|
| 87 | ||
| 88 | /** |
|
| 89 | * Creates a new Company entity. |
|
| 90 | * |
|
| 91 | * @Route("/create", name="company_create") |
|
| 92 | * @Method("POST") |
|
| 93 | * @Template("settings/company/new.html.twig") |
|
| 94 | * |
|
| 95 | * @param \Symfony\Component\HttpFoundation\Request $request Form request |
|
| 96 | * @return array |
|
| 97 | */ |
|
| 98 | public function createAction(Request $request) |
|
| 99 | { |
|
| 100 | $return = $this->abstractCreateAction( |
|
| 101 | $request, |
|
| 102 | 'Settings\Company', |
|
| 103 | 'App\Entity\Settings\Company', |
|
| 104 | CompanyType::class, |
|
| 105 | 'company' |
|
| 106 | ); |
|
| 107 | ||
| 108 | return $return; |
|
| 109 | } |
|
| 110 | ||
| 111 | /** |
|
| 112 | * Displays a form to edit an existing Company entity. |
|
| 113 | * |
|
| 114 | * @Route("/{id}/edit", name="company_edit", requirements={"id"="\d+"}) |
|
| 115 | * @Method("GET") |
|
| 116 | * @Template() |
|
| 117 | * |
|
| 118 | * @param \App\Entity\Settings\Company $company Company item to edit |
|
| 119 | * @return array |
|
| 120 | */ |
|
| 121 | public function editAction(Company $company) |
|
| 122 | { |
|
| 123 | $return = $this->abstractEditAction( |
|
| 124 | $company, |
|
| 125 | 'company', |
|
| 126 | CompanyType::class |
|
| 127 | ); |
|
| 128 | ||
| 129 | return $return; |
|
| 130 | } |
|
| 131 | ||
| 132 | /** |
|
| 133 | * Edits an existing Company entity. |
|
| 134 | * |
|
| 135 | * @Route("/{id}/update", name="company_update", requirements={"id"="\d+"}) |
|
| 136 | * @Method("PUT") |
|
| 137 | * @Template("settings/company/edit.html.twig") |
|
| 138 | * |
|
| 139 | * @param \App\Entity\Settings\Company $company Company item to update |
|
| 140 | * @param \Symfony\Component\HttpFoundation\Request $request Form request |
|
| 141 | * @return array |
|
| 142 | */ |
|
| 143 | public function updateAction(Company $company, Request $request) |
|
| 144 | { |
|
| 145 | $return = $this->abstractUpdateAction( |
|
| 146 | $company, |
|
| 147 | $request, |
|
| 148 | 'company', |
|
| 149 | CompanyType::class |
|
| 150 | ); |
|
| 151 | ||
| 152 | return $return; |
|
| 153 | } |
|
| 154 | ||
| 155 | /** |
|
| 156 | * Deletes a Company entity. |
|
| 157 | * |
|
| 158 | * @Route("/{id}/delete", name="company_delete", requirements={"id"="\d+"}) |
|
| 159 | * @Method("DELETE") |
|
| 160 | * |
|
| 161 | * @param \App\Entity\Settings\Company $company Company item to delete |
|
| 162 | * @param \Symfony\Component\HttpFoundation\Request $request Form request |
|
| 163 | * @return array |
|
| 164 | */ |
|
| 165 | public function deleteAction(Company $company, Request $request) |
|
| 166 | { |
|
| 167 | $this->abstractDeleteAction( |
|
| 168 | $company, |
|
| 169 | $request, |
|
| 170 | 'company' |
|
| 171 | ); |
|
| 172 | ||
| 173 | return $this->redirectToRoute('company'); |
|
| 174 | } |
|
| 175 | } |
|
| 176 | ||
| @@ 32-175 (lines=144) @@ | ||
| 29 | * |
|
| 30 | * @Route("/admin/settings/diverse/familylog") |
|
| 31 | */ |
|
| 32 | class FamilyLogController extends AbstractController |
|
| 33 | { |
|
| 34 | /** |
|
| 35 | * Lists all FamilyLog entities. |
|
| 36 | * |
|
| 37 | * @Route("/", name="familylog") |
|
| 38 | * @Method("GET") |
|
| 39 | * @Template() |
|
| 40 | * |
|
| 41 | * @return array |
|
| 42 | */ |
|
| 43 | public function indexAction() |
|
| 44 | { |
|
| 45 | $return = $this->abstractIndexAction('Settings\Diverse\FamilyLog', 'familylog', null); |
|
| 46 | ||
| 47 | return $return; |
|
| 48 | } |
|
| 49 | ||
| 50 | /** |
|
| 51 | * Finds and displays a FamilyLog entity. |
|
| 52 | * |
|
| 53 | * @Route("/{slug}/show", name="familylog_show") |
|
| 54 | * @Method("GET") |
|
| 55 | * @Template() |
|
| 56 | * |
|
| 57 | * @param \App\Entity\Settings\Diverse\FamilyLog $familylog FamilyLog item to display |
|
| 58 | * @return array |
|
| 59 | */ |
|
| 60 | public function showAction(FamilyLog $familylog) |
|
| 61 | { |
|
| 62 | $return = $this->abstractShowAction($familylog, 'familylog'); |
|
| 63 | ||
| 64 | return $return; |
|
| 65 | } |
|
| 66 | ||
| 67 | /** |
|
| 68 | * Displays a form to create a new FamilyLog entity. |
|
| 69 | * |
|
| 70 | * @Route("/new", name="familylog_new") |
|
| 71 | * @Method("GET") |
|
| 72 | * @Template() |
|
| 73 | * |
|
| 74 | * @return array |
|
| 75 | */ |
|
| 76 | public function newAction() |
|
| 77 | { |
|
| 78 | $return = $this->abstractNewAction( |
|
| 79 | 'Settings\Diverse\FamilyLog', |
|
| 80 | 'App\Entity\Settings\Diverse\FamilyLog', |
|
| 81 | FamilyLogType::class, |
|
| 82 | 'familylog' |
|
| 83 | ); |
|
| 84 | ||
| 85 | return $return; |
|
| 86 | } |
|
| 87 | ||
| 88 | /** |
|
| 89 | * Creates a new FamilyLog entity. |
|
| 90 | * |
|
| 91 | * @Route("/create", name="familylog_create") |
|
| 92 | * @Method("POST") |
|
| 93 | * @Template("settings/diverse/family_log/new.html.twig") |
|
| 94 | * |
|
| 95 | * @param \Symfony\Component\HttpFoundation\Request $request Form request |
|
| 96 | * @return array |
|
| 97 | */ |
|
| 98 | public function createAction(Request $request) |
|
| 99 | { |
|
| 100 | $return = $this->abstractCreateAction( |
|
| 101 | $request, |
|
| 102 | 'Settings\Diverse\Familylog', |
|
| 103 | 'App\Entity\Settings\Diverse\FamilyLog', |
|
| 104 | FamilyLogType::class, |
|
| 105 | 'familylog' |
|
| 106 | ); |
|
| 107 | ||
| 108 | return $return; |
|
| 109 | } |
|
| 110 | ||
| 111 | /** |
|
| 112 | * Displays a form to edit an existing FamilyLog entity. |
|
| 113 | * |
|
| 114 | * @Route("/{slug}/edit", name="familylog_edit") |
|
| 115 | * @Method("GET") |
|
| 116 | * @Template() |
|
| 117 | * |
|
| 118 | * @param \AppBunlde\Entity\Settings\Diverse\FamilyLog $familylog FamilyLog item to edit |
|
| 119 | * @return array |
|
| 120 | */ |
|
| 121 | public function editAction(FamilyLog $familylog) |
|
| 122 | { |
|
| 123 | $return = $this->abstractEditAction( |
|
| 124 | $familylog, |
|
| 125 | 'familylog', |
|
| 126 | FamilyLogType::class |
|
| 127 | ); |
|
| 128 | ||
| 129 | return $return; |
|
| 130 | } |
|
| 131 | ||
| 132 | /** |
|
| 133 | * Edits an existing FamilyLog entity. |
|
| 134 | * |
|
| 135 | * @Route("/{slug}/update", name="familylog_update") |
|
| 136 | * @Method("PUT") |
|
| 137 | * @Template("settings/diverse/family_log/edit.html.twig") |
|
| 138 | * |
|
| 139 | * @param \App\Entity\Settings\Diverse\FamilyLog $familylog FamilyLog item to update |
|
| 140 | * @param \Symfony\Component\HttpFoundation\Request $request Form request |
|
| 141 | * @return array |
|
| 142 | */ |
|
| 143 | public function updateAction(FamilyLog $familylog, Request $request) |
|
| 144 | { |
|
| 145 | $return = $this->abstractUpdateAction( |
|
| 146 | $familylog, |
|
| 147 | $request, |
|
| 148 | 'familylog', |
|
| 149 | FamilyLogType::class |
|
| 150 | ); |
|
| 151 | ||
| 152 | return $return; |
|
| 153 | } |
|
| 154 | ||
| 155 | /** |
|
| 156 | * Deletes a FamilyLog entity. |
|
| 157 | * |
|
| 158 | * @Route("/{id}/delete", name="familylog_delete", requirements={"id"="\d+"}) |
|
| 159 | * @Method("DELETE") |
|
| 160 | * |
|
| 161 | * @param \App\Entity\Settings\Diverse\FamilyLog $familylog FamilyLog item to delete |
|
| 162 | * @param \Symfony\Component\HttpFoundation\Request $request Form request |
|
| 163 | * @return array |
|
| 164 | */ |
|
| 165 | public function deleteAction(FamilyLog $familylog, Request $request) |
|
| 166 | { |
|
| 167 | $this->abstractDeleteAction( |
|
| 168 | $familylog, |
|
| 169 | $request, |
|
| 170 | 'familylog' |
|
| 171 | ); |
|
| 172 | ||
| 173 | return $this->redirectToRoute('familylog'); |
|
| 174 | } |
|
| 175 | } |
|
| 176 | ||
| @@ 32-162 (lines=131) @@ | ||
| 29 | * |
|
| 30 | * @Route("/admin/settings/diverse/tva") |
|
| 31 | */ |
|
| 32 | class TvaController extends AbstractController |
|
| 33 | { |
|
| 34 | /** |
|
| 35 | * Lists all Tva entities. |
|
| 36 | * |
|
| 37 | * @Route("/", name="tva") |
|
| 38 | * @Method("GET") |
|
| 39 | * @Template() |
|
| 40 | * |
|
| 41 | * @return array |
|
| 42 | */ |
|
| 43 | public function indexAction() |
|
| 44 | { |
|
| 45 | $return = $this->abstractIndexAction('Settings\Diverse\Tva', 'tva', null); |
|
| 46 | ||
| 47 | return $return; |
|
| 48 | } |
|
| 49 | ||
| 50 | /** |
|
| 51 | * Finds and displays a Tva entity. |
|
| 52 | * |
|
| 53 | * @Route("/{id}/show", name="tva_show", requirements={"id"="\d+"}) |
|
| 54 | * @Method("GET") |
|
| 55 | * @Template() |
|
| 56 | * |
|
| 57 | * @param \App\Entity\Settings\Diverse\Tva $tva Tva item to display |
|
| 58 | * @return array |
|
| 59 | */ |
|
| 60 | public function showAction(Tva $tva) |
|
| 61 | { |
|
| 62 | $return = $this->abstractShowAction($tva, 'tva'); |
|
| 63 | ||
| 64 | return $return; |
|
| 65 | } |
|
| 66 | ||
| 67 | /** |
|
| 68 | * Displays a form to create a new Tva entity. |
|
| 69 | * |
|
| 70 | * @Route("/new", name="tva_new") |
|
| 71 | * @Method("GET") |
|
| 72 | * @Template() |
|
| 73 | * |
|
| 74 | * @return array |
|
| 75 | */ |
|
| 76 | public function newAction() |
|
| 77 | { |
|
| 78 | $return = $this->abstractNewAction( |
|
| 79 | 'Settings\Diverse\Tva', |
|
| 80 | 'App\Entity\Settings\Diverse\Tva', |
|
| 81 | TvaType::class, |
|
| 82 | 'tva' |
|
| 83 | ); |
|
| 84 | ||
| 85 | return $return; |
|
| 86 | } |
|
| 87 | ||
| 88 | /** |
|
| 89 | * Creates a new Tva entity. |
|
| 90 | * |
|
| 91 | * @Route("/create", name="tva_create") |
|
| 92 | * @Method("POST") |
|
| 93 | * @Template("settings/diverse/tva/new.html.twig") |
|
| 94 | * |
|
| 95 | * @param \Symfony\Component\HttpFoundation\Request $request Form request |
|
| 96 | * @return array |
|
| 97 | */ |
|
| 98 | public function createAction(Request $request) |
|
| 99 | { |
|
| 100 | $return = $this->abstractCreateAction( |
|
| 101 | $request, |
|
| 102 | 'Settings\Diverse\Tva', |
|
| 103 | 'App\Entity\Settings\Diverse\Tva', |
|
| 104 | TvaType::class, |
|
| 105 | 'tva' |
|
| 106 | ); |
|
| 107 | ||
| 108 | return $return; |
|
| 109 | } |
|
| 110 | ||
| 111 | /** |
|
| 112 | * Displays a form to edit an existing Tva entity. |
|
| 113 | * |
|
| 114 | * @Route("/{id}/edit", name="tva_edit", requirements={"id"="\d+"}) |
|
| 115 | * @Method("GET") |
|
| 116 | * @Template() |
|
| 117 | * |
|
| 118 | * @param \App\Entity\Settings\Diverse\Tva $tva Tva item to edit |
|
| 119 | * @return array |
|
| 120 | */ |
|
| 121 | public function editAction(Tva $tva) |
|
| 122 | { |
|
| 123 | $return = $this->abstractEditAction($tva, 'tva', TvaType::class); |
|
| 124 | ||
| 125 | return $return; |
|
| 126 | } |
|
| 127 | ||
| 128 | /** |
|
| 129 | * Edits an existing Tva entity. |
|
| 130 | * |
|
| 131 | * @Route("/{id}/update", name="tva_update", requirements={"id"="\d+"}) |
|
| 132 | * @Method("PUT") |
|
| 133 | * @Template("settings/diverse/tva/edit.html.twig") |
|
| 134 | * |
|
| 135 | * @param \App\Entity\Settings\Diverse\Tva $tva Tva item to update |
|
| 136 | * @param \Symfony\Component\HttpFoundation\Request $request Form request |
|
| 137 | * @return array |
|
| 138 | */ |
|
| 139 | public function updateAction(Tva $tva, Request $request) |
|
| 140 | { |
|
| 141 | $return = $this->abstractUpdateAction($tva, $request, 'tva', TvaType::class); |
|
| 142 | ||
| 143 | return $return; |
|
| 144 | } |
|
| 145 | ||
| 146 | /** |
|
| 147 | * Deletes a Tva entity. |
|
| 148 | * |
|
| 149 | * @Route("/{id}/delete", name="tva_delete", requirements={"id"="\d+"}) |
|
| 150 | * @Method("DELETE") |
|
| 151 | * |
|
| 152 | * @param \App\Entity\Settings\Diverse\Tva $tva Tva item to delete |
|
| 153 | * @param \Symfony\Component\HttpFoundation\Request $request Form request |
|
| 154 | * @return type |
|
| 155 | */ |
|
| 156 | public function deleteAction(Tva $tva, Request $request) |
|
| 157 | { |
|
| 158 | $this->abstractDeleteAction($tva, $request, 'tva'); |
|
| 159 | ||
| 160 | return $this->redirectToRoute('tva'); |
|
| 161 | } |
|
| 162 | } |
|
| 163 | ||
| @@ 32-172 (lines=141) @@ | ||
| 29 | * |
|
| 30 | * @Route("/admin/settings/diverse/unit") |
|
| 31 | */ |
|
| 32 | class UnitController extends AbstractController |
|
| 33 | { |
|
| 34 | /** |
|
| 35 | * Lists all Unit entities. |
|
| 36 | * |
|
| 37 | * @Route("/", name="unit") |
|
| 38 | * @Method("GET") |
|
| 39 | * @Template() |
|
| 40 | * |
|
| 41 | * @param \Symfony\Component\HttpFoundation\Request $request Paginate request |
|
| 42 | * @return array |
|
| 43 | */ |
|
| 44 | public function indexAction(Request $request) |
|
| 45 | { |
|
| 46 | $return = $this->abstractIndexAction('Settings\Diverse\Unit', 'unit', $request); |
|
| 47 | ||
| 48 | return $return; |
|
| 49 | } |
|
| 50 | ||
| 51 | /** |
|
| 52 | * Finds and displays a Unit entity. |
|
| 53 | * |
|
| 54 | * @Route("/{slug}/show", name="unit_show") |
|
| 55 | * @Method("GET") |
|
| 56 | * @Template() |
|
| 57 | * |
|
| 58 | * @param \App\Entity\Settings\Diverse\Unit $unit UnitStaorage to display |
|
| 59 | * @return array |
|
| 60 | */ |
|
| 61 | public function showAction(Unit $unit) |
|
| 62 | { |
|
| 63 | $return = $this->abstractShowAction($unit, 'unit'); |
|
| 64 | ||
| 65 | return $return; |
|
| 66 | } |
|
| 67 | ||
| 68 | /** |
|
| 69 | * Displays a form to create a new Unit entity. |
|
| 70 | * |
|
| 71 | * @Route("/new", name="unit_new") |
|
| 72 | * @Method("GET") |
|
| 73 | * @Template() |
|
| 74 | * |
|
| 75 | * @return array |
|
| 76 | */ |
|
| 77 | public function newAction() |
|
| 78 | { |
|
| 79 | $return = $this->abstractNewAction( |
|
| 80 | 'Settings\Diverse\Unit', |
|
| 81 | 'App\Entity\Settings\Diverse\Unit', |
|
| 82 | UnitType::class, |
|
| 83 | 'unit' |
|
| 84 | ); |
|
| 85 | ||
| 86 | return $return; |
|
| 87 | } |
|
| 88 | ||
| 89 | /** |
|
| 90 | * Creates a new Unit entity. |
|
| 91 | * |
|
| 92 | * @Route("/create", name="unit_create") |
|
| 93 | * @Method("POST") |
|
| 94 | * @Template("settings/diverse/unit/new.html.twig") |
|
| 95 | * |
|
| 96 | * @param \Symfony\Component\HttpFoundation\Request $request Form request |
|
| 97 | * @return array |
|
| 98 | */ |
|
| 99 | public function createAction(Request $request) |
|
| 100 | { |
|
| 101 | $return = $this->abstractCreateAction( |
|
| 102 | $request, |
|
| 103 | 'Settings\Diverse\Unit', |
|
| 104 | 'App\Entity\Settings\Diverse\Unit', |
|
| 105 | UnitType::class, |
|
| 106 | 'unit' |
|
| 107 | ); |
|
| 108 | ||
| 109 | return $return; |
|
| 110 | } |
|
| 111 | ||
| 112 | /** |
|
| 113 | * Displays a form to edit an existing Unit entity. |
|
| 114 | * |
|
| 115 | * @Route("/{slug}/edit", name="unit_edit") |
|
| 116 | * @Method("GET") |
|
| 117 | * @Template() |
|
| 118 | * |
|
| 119 | * @param \App\Entity\Settings\Diverse\Unit $unit Unit item to edit |
|
| 120 | * @return array |
|
| 121 | */ |
|
| 122 | public function editAction(Unit $unit) |
|
| 123 | { |
|
| 124 | $return = $this->abstractEditAction( |
|
| 125 | $unit, |
|
| 126 | 'unit', |
|
| 127 | UnitType::class |
|
| 128 | ); |
|
| 129 | ||
| 130 | return $return; |
|
| 131 | } |
|
| 132 | ||
| 133 | /** |
|
| 134 | * Edits an existing Unit entity. |
|
| 135 | * |
|
| 136 | * @Route("/{slug}/update", name="unit_update") |
|
| 137 | * @Method("PUT") |
|
| 138 | * @Template("settings/diverse/unit/edit.html.twig") |
|
| 139 | * |
|
| 140 | * @param \AppBndle\Entity\Settings\Diverse\Unit $unit Unit item to update |
|
| 141 | * @param \Symfony\Component\HttpFoundation\Request $request Form request |
|
| 142 | * @return array |
|
| 143 | */ |
|
| 144 | public function updateAction(Unit $unit, Request $request) |
|
| 145 | { |
|
| 146 | $return = $this->abstractUpdateAction( |
|
| 147 | $unit, |
|
| 148 | $request, |
|
| 149 | 'unit', |
|
| 150 | UnitType::class |
|
| 151 | ); |
|
| 152 | ||
| 153 | return $return; |
|
| 154 | } |
|
| 155 | ||
| 156 | /** |
|
| 157 | * Deletes a Unit entity. |
|
| 158 | * |
|
| 159 | * @Route("/{id}/delete", name="unit_delete", requirements={"id"="\d+"}) |
|
| 160 | * @Method("DELETE") |
|
| 161 | * |
|
| 162 | * @param \App\Entity\Settings\Diverse\Unit $unit Unit item to delete |
|
| 163 | * @param \Symfony\Component\HttpFoundation\Request $request Form request |
|
| 164 | * @return array |
|
| 165 | */ |
|
| 166 | public function deleteAction(Unit $unit, Request $request) |
|
| 167 | { |
|
| 168 | $this->abstractDeleteAction($unit, $request, 'unit'); |
|
| 169 | ||
| 170 | return $this->redirectToRoute('unit'); |
|
| 171 | } |
|
| 172 | } |
|
| 173 | ||
| @@ 32-171 (lines=140) @@ | ||
| 29 | * |
|
| 30 | * @Route("/admin/settings/diverse/zonestorage") |
|
| 31 | */ |
|
| 32 | class ZoneStorageController extends AbstractController |
|
| 33 | { |
|
| 34 | /** |
|
| 35 | * Lists all ZoneStorage entities. |
|
| 36 | * |
|
| 37 | * @Route("/", name="zonestorage") |
|
| 38 | * @Method("GET") |
|
| 39 | * @Template() |
|
| 40 | * |
|
| 41 | * @return array |
|
| 42 | */ |
|
| 43 | public function indexAction() |
|
| 44 | { |
|
| 45 | $return = $this->abstractIndexAction('Settings\Diverse\ZoneStorage', 'zonestorage', null); |
|
| 46 | ||
| 47 | return $return; |
|
| 48 | } |
|
| 49 | ||
| 50 | /** |
|
| 51 | * Finds and displays a ZoneStorage entity. |
|
| 52 | * |
|
| 53 | * @Route("/{slug}/show", name="zonestorage_show") |
|
| 54 | * @Method("GET") |
|
| 55 | * @Template() |
|
| 56 | * |
|
| 57 | * @param \App\Entity\Settings\Diverse\ZoneStorage $zonestorage ZoneStorage to display |
|
| 58 | * @return array |
|
| 59 | */ |
|
| 60 | public function showAction(ZoneStorage $zonestorage) |
|
| 61 | { |
|
| 62 | $return = $this->abstractShowAction($zonestorage, 'zonestorage'); |
|
| 63 | ||
| 64 | return $return; |
|
| 65 | } |
|
| 66 | ||
| 67 | /** |
|
| 68 | * Displays a form to create a new ZoneStorage entity. |
|
| 69 | * |
|
| 70 | * @Route("/new", name="zonestorage_new") |
|
| 71 | * @Method("GET") |
|
| 72 | * @Template() |
|
| 73 | * |
|
| 74 | * @return array |
|
| 75 | */ |
|
| 76 | public function newAction() |
|
| 77 | { |
|
| 78 | $return = $this->abstractNewAction( |
|
| 79 | 'ZoneStorage', |
|
| 80 | 'App\Entity\Settings\Diverse\ZoneStorage', |
|
| 81 | ZoneStorageType::class, |
|
| 82 | 'zonestorage' |
|
| 83 | ); |
|
| 84 | ||
| 85 | return $return; |
|
| 86 | } |
|
| 87 | ||
| 88 | /** |
|
| 89 | * Creates a new ZoneStorage entity. |
|
| 90 | * |
|
| 91 | * @Route("/create", name="zonestorage_create") |
|
| 92 | * @Method("POST") |
|
| 93 | * @Template("settings/diverse/zone_storage/new.html.twig") |
|
| 94 | * |
|
| 95 | * @param \Symfony\Component\HttpFoundation\Request $request Form request |
|
| 96 | * @return array |
|
| 97 | */ |
|
| 98 | public function createAction(Request $request) |
|
| 99 | { |
|
| 100 | $return = $this->abstractCreateAction( |
|
| 101 | $request, |
|
| 102 | 'Settings\Diverse\Zonestorage', |
|
| 103 | 'App\Entity\Settings\Diverse\ZoneStorage', |
|
| 104 | ZoneStorageType::class, |
|
| 105 | 'zonestorage' |
|
| 106 | ); |
|
| 107 | ||
| 108 | return $return; |
|
| 109 | } |
|
| 110 | ||
| 111 | /** |
|
| 112 | * Displays a form to edit an existing ZoneStorage entity. |
|
| 113 | * |
|
| 114 | * @Route("/{slug}/edit", name="zonestorage_edit") |
|
| 115 | * @Method("GET") |
|
| 116 | * @Template() |
|
| 117 | * |
|
| 118 | * @param \App\Entity\Settings\Diverse\ZoneStorage $zonestorage ZoneStorage item to edit |
|
| 119 | * @return array |
|
| 120 | */ |
|
| 121 | public function editAction(ZoneStorage $zonestorage) |
|
| 122 | { |
|
| 123 | $return = $this->abstractEditAction( |
|
| 124 | $zonestorage, |
|
| 125 | 'zonestorage', |
|
| 126 | ZoneStorageType::class |
|
| 127 | ); |
|
| 128 | ||
| 129 | return $return; |
|
| 130 | } |
|
| 131 | ||
| 132 | /** |
|
| 133 | * Edits an existing ZoneStorage entity. |
|
| 134 | * |
|
| 135 | * @Route("/{slug}/update", name="zonestorage_update") |
|
| 136 | * @Method("PUT") |
|
| 137 | * @Template("settings/diverse/zone_storage/edit.html.twig") |
|
| 138 | * |
|
| 139 | * @param \App\Entity\Settings\Diverse\ZoneStorage $zonestorage ZoneStorage item to update |
|
| 140 | * @param \Symfony\Component\HttpFoundation\Request $request Form request |
|
| 141 | * @return array |
|
| 142 | */ |
|
| 143 | public function updateAction(ZoneStorage $zonestorage, Request $request) |
|
| 144 | { |
|
| 145 | $return = $this->abstractUpdateAction( |
|
| 146 | $zonestorage, |
|
| 147 | $request, |
|
| 148 | 'zonestorage', |
|
| 149 | ZoneStorageType::class |
|
| 150 | ); |
|
| 151 | ||
| 152 | return $return; |
|
| 153 | } |
|
| 154 | ||
| 155 | /** |
|
| 156 | * Deletes a ZoneStorage entity. |
|
| 157 | * |
|
| 158 | * @Route("/{id}/delete", name="zonestorage_delete", requirements={"id"="\d+"}) |
|
| 159 | * @Method("DELETE") |
|
| 160 | * |
|
| 161 | * @param \App\Entity\Settings\Diverse\ZoneStorage $zonestorage ZoneStorage item to delete |
|
| 162 | * @param \Symfony\Component\HttpFoundation\Request $request Form request |
|
| 163 | * @return array |
|
| 164 | */ |
|
| 165 | public function deleteAction(ZoneStorage $zonestorage, Request $request) |
|
| 166 | { |
|
| 167 | $this->abstractDeleteAction($zonestorage, $request, 'zonestorage'); |
|
| 168 | ||
| 169 | return $this->redirectToRoute('zonestorage'); |
|
| 170 | } |
|
| 171 | } |
|
| 172 | ||