mirror of
https://github.com/silverstripe/silverstripe-widgets
synced 2024-10-22 15:05:54 +00:00
Update WidgetArea.php
This commit is contained in:
parent
0986537be7
commit
8a6308fc00
@ -33,10 +33,12 @@ class WidgetArea extends DataObject
|
|||||||
$items = $this->ItemsToRender();
|
$items = $this->ItemsToRender();
|
||||||
if (!is_null($items)){
|
if (!is_null($items)){
|
||||||
foreach ($items as $widget) {
|
foreach ($items as $widget) {
|
||||||
$controller = $widget->getController();
|
if ($widget->canView()) {
|
||||||
|
$controller = $widget->getController();
|
||||||
|
|
||||||
$controller->init();
|
$controller->init();
|
||||||
$controllers->push($controller);
|
$controllers->push($controller);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $controllers;
|
return $controllers;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user