1 | <?php |
||
31 | class WidgetController extends Controller |
||
32 | { |
||
33 | /** |
||
34 | * @var Widget |
||
35 | */ |
||
36 | protected $widget; |
||
37 | |||
38 | /** |
||
39 | * @var array |
||
40 | */ |
||
41 | private static $allowed_actions = array( |
||
42 | 'editablesegment' |
||
43 | ); |
||
44 | |||
45 | /** |
||
46 | * @param Widget $widget |
||
47 | */ |
||
48 | public function __construct($widget = null) |
||
57 | |||
58 | /** |
||
59 | * @param string $action |
||
60 | * @return string |
||
61 | */ |
||
62 | public function Link($action = null) |
||
73 | |||
74 | /** |
||
75 | * @return Widget |
||
76 | */ |
||
77 | public function getWidget() |
||
81 | |||
82 | /** |
||
83 | * Overloaded from {@link Widget->Content()} to allow for controller / form |
||
84 | * linking. |
||
85 | * |
||
86 | * @return string HTML |
||
87 | */ |
||
88 | public function Content() |
||
92 | |||
93 | /** |
||
94 | * Overloaded from {@link Widget->WidgetHolder()} to allow for controller/ |
||
95 | * form linking. |
||
96 | * |
||
97 | * @return string HTML |
||
98 | */ |
||
99 | public function WidgetHolder() |
||
103 | |||
104 | /** |
||
105 | * Uses the `WidgetEditor.ss` template and {@link Widget->editablesegment()} |
||
106 | * to render a administrator-view of the widget. It is assumed that this |
||
107 | * view contains form elements which are submitted and saved through |
||
108 | * {@link WidgetAreaEditor} within the CMS interface. |
||
109 | * |
||
110 | * @return string HTML |
||
111 | */ |
||
112 | public function editablesegment() |
||
133 | } |
||
134 |
This check marks private properties in classes that are never used. Those properties can be removed.