Issues (76)

Components/GridImageText/functions.php (2 issues)

Labels
Severity
1
<?php
2
3
namespace Flynt\Components\GridImageText;
4
5
use Flynt\FieldVariables;
0 ignored issues
show
The type Flynt\FieldVariables was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
7
function getACFLayout()
8
{
9
    return [
10
        'name' => 'GridImageText',
11
        'label' => 'Grid: Image Text',
12
        'sub_fields' => [
13
            [
14
                'label' => __('General', 'flynt'),
15
                'name' => 'generalTab',
16
                'type' => 'tab',
17
                'placement' => 'top',
18
                'endpoint' => 0
19
            ],
20
            [
21
                'label' => __('Title', 'flynt'),
22
                'name' => 'preContentHtml',
23
                'type' => 'wysiwyg',
24
                'tabs' => 'visual,text',
25
                'media_upload' => 0,
26
                'instructions' => __('Want to add a headline? And a paragraph? Go ahead! Or just leave it empty and nothing will be shown.', 'flynt'),
27
                'delay' => 1,
28
            ],
29
            [
30
                'label' => __('Items', 'flynt'),
31
                'name' => 'items',
32
                'type' => 'repeater',
33
                'collapsed' => '',
34
                'layout' => 'block',
35
                'button_label' => 'Add',
36
                'sub_fields' => [
37
                    [
38
                        'label' => __('Image', 'flynt'),
39
                        'name' => 'image',
40
                        'type' => 'image',
41
                        'preview_size' => 'medium',
42
                        'instructions' => __('Image-Format: JPG, PNG.', 'flynt'),
43
                        'mime_types' => 'jpg,jpeg,png',
44
                        'wrapper' => [
45
                            'width' => 40
46
                        ],
47
                    ],
48
                    [
49
                        'label' => __('Content', 'flynt'),
50
                        'name' => 'contentHtml',
51
                        'type' => 'wysiwyg',
52
                        'tabs' => 'visual,text',
53
                        'media_upload' => 0,
54
                        'delay' => 1,
55
                        'wrapper' => [
56
                            'width' => 60
57
                        ],
58
                    ]
59
                ]
60
            ],
61
            [
62
                'label' => __('Options', 'flynt'),
63
                'name' => 'optionsTab',
64
                'type' => 'tab',
65
                'placement' => 'top',
66
                'endpoint' => 0
67
            ],
68
            [
69
                'label' => '',
70
                'name' => 'options',
71
                'type' => 'group',
72
                'layout' => 'row',
73
                'sub_fields' => [
74
                    FieldVariables\getTheme(),
0 ignored issues
show
The function getTheme was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

74
                    /** @scrutinizer ignore-call */ 
75
                    FieldVariables\getTheme(),
Loading history...
75
                    [
76
                        'label' => __('Columns', 'flynt'),
77
                        'name' => 'columns',
78
                        'type' => 'number',
79
                        'default_value' => 3,
80
                        'min' => 1,
81
                        'max' => 4,
82
                        'step' => 1
83
                    ],
84
                    [
85
                        'label' => __('Show as Card', 'flynt'),
86
                        'name' => 'card',
87
                        'type' => 'true_false',
88
                        'default_value' => 0,
89
                        'ui' => 1
90
                    ]
91
                ]
92
            ]
93
        ]
94
    ];
95
}
96