Subversion-Projekte lars-tiefland.webanos.faltradxxs.de

Revision

Revision 114 | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 114 Revision 134
Zeile 118... Zeile 118...
118
         * @return RedirectResponse
118
         * @return RedirectResponse
119
         */
119
         */
120
        public function update( ActionRequest $request, int $id ): RedirectResponse
120
        public function update( ActionRequest $request, int $id ): RedirectResponse
121
        {
121
        {
122
            //
122
            //
123
            $rules = [
-
 
124
                'name' => 'bail|max:255',
-
 
125
            ];
-
 
126
            $request->validate( $rules );
-
 
127
            $bu = Action::find( $id );
123
            $bu = Action::find( $id );
128
            $data = $request->validated();
124
            $data = $request->validated();
-
 
125
 
-
 
126
            $configArr = $data["config"];
-
 
127
            if ( $data["navigation_yes"] )
-
 
128
            {
-
 
129
                $configArr["navigation"] = true;
-
 
130
 
-
 
131
                if ( $data["arrow_yes"] )
-
 
132
                {
-
 
133
                    $configArr["pfeile"] = true;
-
 
134
 
-
 
135
                    if ( $data["arrow_inside"] )
-
 
136
                    {
-
 
137
                        $configArr["pfeile_innen"] = true;
-
 
138
                    }
-
 
139
                    elseif ( $data["arrow_outside"] )
-
 
140
                    {
-
 
141
                        $configArr["pfeile_aussen"] = true;
-
 
142
                    }
-
 
143
                }
-
 
144
 
-
 
145
                if ( $data["circle_yes"] )
-
 
146
                {
-
 
147
                    $configArr["kreise"] = true;
-
 
148
 
-
 
149
                    if ( $data["circle_up"] )
-
 
150
                    {
-
 
151
                        $configArr["kreise_oben"] = true;
-
 
152
                    }
-
 
153
                    elseif ( $data["circle_down"] )
-
 
154
                    {
-
 
155
                        $configArr["kreise_unten"] = true;
-
 
156
                    }
-
 
157
                }
-
 
158
 
-
 
159
                if ( $data["box_yes"] )
-
 
160
                {
-
 
161
                    $configArr["boxen"] = true;
-
 
162
 
-
 
163
                    if ( $data["box_right"] )
-
 
164
                    {
-
 
165
                        $configArr["box_rechts"] = true;
-
 
166
                    }
-
 
167
                    elseif ( $data["box_left"] )
-
 
168
                    {
-
 
169
                        $configArr["box_links"] = true;
-
 
170
                    }
-
 
171
                    elseif ( $data["box_up"] )
-
 
172
                    {
-
 
173
                        $configArr["box_oben"] = true;
-
 
174
                    }
-
 
175
                    elseif ( $data["box_down"] )
-
 
176
                    {
-
 
177
                        $configArr["box_unten"] = true;
-
 
178
                    }
-
 
179
                }
-
 
180
            }
-
 
181
 
-
 
182
            if ( isset( $data["navigation_yes"] ) )
-
 
183
            {
-
 
184
                $configArr["navigation"] = 1;
-
 
185
 
-
 
186
                if ( isset( $data["arrow_yes"] ) )
-
 
187
                {
-
 
188
                    $configArr["pfeile"] = 1;
-
 
189
 
-
 
190
                    if ( $data["arrow_inside"] )
-
 
191
                    {
-
 
192
                        $configArr["pfeile_innen"] = 1;
-
 
193
                    }
-
 
194
                    else
-
 
195
                    {
-
 
196
                        $configArr["pfeile_innen"] = 0;
-
 
197
                    }
-
 
198
                    if ( $data["arrow_outside"] )
-
 
199
                    {
-
 
200
                        $configArr["pfeile_aussen"] = 1;
-
 
201
                    }
-
 
202
                    else
-
 
203
                    {
-
 
204
                        $configArr["pfeile_aussen"] = 0;
-
 
205
                    }
-
 
206
 
-
 
207
                }
-
 
208
                else
-
 
209
                {
-
 
210
                    $configArr["pfeile"] = 0;
-
 
211
                }
-
 
212
 
-
 
213
                if ( isset( $data["circle_yes"] ) )
-
 
214
                {
-
 
215
                    $configArr["kreise"] = 1;
-
 
216
 
-
 
217
                    if ( isset( $data["circle_up"] ) )
-
 
218
                    {
-
 
219
                        $configArr["kreise_oben"] = 1;
-
 
220
                    }
-
 
221
                    else
-
 
222
                    {
-
 
223
                        $configArr["kreise_oben"] = 0;
-
 
224
                    }
-
 
225
                    if ( isset( $data["circle_down"] ) )
-
 
226
                    {
-
 
227
                        $configArr["kreise_unten"] = 1;
-
 
228
                    }
-
 
229
                    else
-
 
230
                    {
-
 
231
                        $configArr["kreise_unten"] = 0;
-
 
232
                    }
-
 
233
                }
-
 
234
                else
-
 
235
                {
-
 
236
                    $configArr["kreise"] = 0;
-
 
237
                }
-
 
238
 
-
 
239
                if ( isset( $data["box_yes"] ) )
-
 
240
                {
-
 
241
                    $configArr["boxen"] = 1;
-
 
242
 
-
 
243
                    if ( $data["box_right"] )
-
 
244
                    {
-
 
245
                        $configArr["box_rechts"] = 1;
-
 
246
                    }
-
 
247
                    else
-
 
248
                    {
-
 
249
                        $configArr["box_rechts"] = 0;
-
 
250
                    }
-
 
251
                    if ( $data["box_left"] )
-
 
252
                    {
-
 
253
                        $configArr["box_links"] = 1;
-
 
254
                    }
-
 
255
                    else
-
 
256
                    {
-
 
257
                        $configArr["box_links"] = 0;
-
 
258
                    }
-
 
259
                    if ( $data["box_up"] )
-
 
260
                    {
-
 
261
                        $configArr["box_oben"] = 1;
-
 
262
                    }
-
 
263
                    else
-
 
264
                    {
-
 
265
                        $configArr["box_oben"] = 0;
-
 
266
                    }
-
 
267
                    if ( $data["box_down"] )
-
 
268
                    {
-
 
269
                        $configArr["box_unten"] = 1;
-
 
270
                    }
-
 
271
                    else
-
 
272
                    {
-
 
273
                        $configArr["box_unten"] = 0;
-
 
274
                    }
-
 
275
                }
-
 
276
                else
-
 
277
                {
-
 
278
                    $configArr["boxen"] = 0;
-
 
279
                }
-
 
280
            }
-
 
281
            else
-
 
282
            {
-
 
283
                $configArr["navigation"] = 0;
-
 
284
            }
-
 
285
            $data["config"] = serialize( $configArr );
129
            $bu->update( $data );
286
            $bu->update( $data );
130
            return redirect( "/actions" );
287
            return redirect( "/actions" );
131
        }
288
        }
Zeile 132... Zeile 289...
132
 
289