public function isDefined($module, $action) { foreach ($this->widgets as $widget) { if ($widget->getModule() === $module && $widget->getAction() === $action) { return true; } } return false; }