1 | <?php |
||
14 | class WidgetArea extends DataObject |
||
15 | { |
||
16 | /** |
||
17 | * @var array |
||
18 | */ |
||
19 | private static $has_many = array( |
||
20 | "Widgets" => Widget::class |
||
21 | ); |
||
22 | |||
23 | /** |
||
24 | * @var string |
||
25 | */ |
||
26 | private static $table_name = 'WidgetArea'; |
||
27 | |||
28 | /** |
||
29 | * |
||
30 | * @var string |
||
31 | */ |
||
32 | public $template = __CLASS__; |
||
33 | |||
34 | /** |
||
35 | * Used in template instead of {@link Widgets()} to wrap each widget in its |
||
36 | * controller, making it easier to access and process form logic and |
||
37 | * actions stored in {@link WidgetController}. |
||
38 | * |
||
39 | * @return SS_List - Collection of {@link WidgetController} instances. |
||
40 | */ |
||
41 | public function WidgetControllers() |
||
55 | |||
56 | /** |
||
57 | * @return HasManyList |
||
58 | */ |
||
59 | public function Items() |
||
63 | |||
64 | /** |
||
65 | * @return HasManyList |
||
66 | */ |
||
67 | public function ItemsToRender() |
||
72 | |||
73 | /** |
||
74 | * @return string - HTML |
||
75 | */ |
||
76 | public function forTemplate() |
||
80 | |||
81 | /** |
||
82 | * |
||
83 | * @param string $template |
||
84 | */ |
||
85 | public function setTemplate($template) |
||
89 | |||
90 | /** |
||
91 | * Delete all connected Widgets when this WidgetArea gets deleted |
||
92 | */ |
||
93 | public function onBeforeDelete() |
||
100 | } |
||
101 |
This check marks private properties in classes that are never used. Those properties can be removed.