Subversion-Projekte lars-tiefland.webanos.marine-sales.de

Revision

Revision 90 | Zur aktuellen Revision | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 90 Revision 91
Zeile 9... Zeile 9...
9
        /**
9
        /**
10
         * Determine if the user is authorized to make this request.
10
         * Determine if the user is authorized to make this request.
11
         *
11
         *
12
         * @return bool
12
         * @return bool
13
         */
13
         */
14
        public function authorize()
14
        public function authorize(): bool
15
        {
15
        {
16
            if ( isset( $GLOBALS["user_rechte"]["online_shop"]["hersteller"] ) )
16
            if ( isset( $GLOBALS["user_rechte"]["online_shop"]["hersteller"] ) )
17
            {
17
            {
18
                return true;
18
                return true;
19
            }
19
            }
Zeile 24... Zeile 24...
24
        /**
24
        /**
25
         * Get the validation rules that apply to the request.
25
         * Get the validation rules that apply to the request.
26
         *
26
         *
27
         * @return array<string, mixed>
27
         * @return array<string, mixed>
28
         */
28
         */
29
        public function rules()
29
        public function rules(): array
30
        {
30
        {
31
            return [
31
            return [
32
                "name"        => "required|max:255",
32
                "name"        => "required|max:255",
33
                "headline"    => "sometimes|max:255",
33
                "headline"    => "sometimes|max:255",
34
                "description" => "sometimes",
34
                "description" => "sometimes",
Zeile 38... Zeile 38...
38
                "calculation" => "sometimes|int|in:0,1",
38
                "calculation" => "sometimes|int|in:0,1",
39
                //
39
                //
40
            ];
40
            ];
41
        }
41
        }
Zeile 42... Zeile 42...
42
 
42
 
43
        protected function passedValidation()
43
        protected function passedValidation(): void
44
        {
44
        {
45
            if ( is_null( $this->description ) )
45
            if ( is_null( $this->description ) )
46
            {
46
            {
-
 
47
                $this->description = "";
47
                $this->description = "";
48
            }
48
        }
49
        }