Code Duplication    Length = 50-59 lines in 2 locations

src/Dashboard/Table/DashboardTableBuilder.php 1 location

@@ 12-70 (lines=59) @@
9
 * @author        PyroCMS, Inc. <[email protected]>
10
 * @author        Ryan Thompson <[email protected]>
11
 */
12
class DashboardTableBuilder extends TableBuilder
13
{
14
15
    /**
16
     * The table filters.
17
     *
18
     * @var array|string
19
     */
20
    protected $filters = [
21
        'search' => [
22
            'fields' => [
23
                'name',
24
                'slug',
25
                'description',
26
            ],
27
        ],
28
    ];
29
30
    /**
31
     * The table columns.
32
     *
33
     * @var array|string
34
     */
35
    protected $columns = [
36
        'name',
37
        'description',
38
    ];
39
40
    /**
41
     * The table buttons.
42
     *
43
     * @var array|string
44
     */
45
    protected $buttons = [
46
        'edit',
47
        'view' => [
48
            'href' => 'admin/dashboard/view/{entry.slug}',
49
        ],
50
    ];
51
52
    /**
53
     * The table actions.
54
     *
55
     * @var array|string
56
     */
57
    protected $actions = [
58
        'delete',
59
    ];
60
61
    /**
62
     * The table options.
63
     *
64
     * @var array
65
     */
66
    protected $options = [
67
        'sortable' => true,
68
    ];
69
70
}
71

src/Widget/Table/WidgetTableBuilder.php 1 location

@@ 12-61 (lines=50) @@
9
 * @author        PyroCMS, Inc. <[email protected]>
10
 * @author        Ryan Thompson <[email protected]>
11
 */
12
class WidgetTableBuilder extends TableBuilder
13
{
14
15
    /**
16
     * The table filters.
17
     *
18
     * @var array|string
19
     */
20
    protected $filters = [
21
        'search' => [
22
            'fields' => [
23
                'title',
24
                'description',
25
            ],
26
        ],
27
        'dashboard',
28
        'extension',
29
    ];
30
31
    /**
32
     * The table columns.
33
     *
34
     * @var array|string
35
     */
36
    protected $columns = [
37
        'title',
38
        'description',
39
        'dashboard',
40
        'entry.extension.title',
41
    ];
42
43
    /**
44
     * The table buttons.
45
     *
46
     * @var array|string
47
     */
48
    protected $buttons = [
49
        'edit',
50
    ];
51
52
    /**
53
     * The table actions.
54
     *
55
     * @var array|string
56
     */
57
    protected $actions = [
58
        'delete',
59
    ];
60
61
}
62