Piwik\Widget\WidgetsList::isDefined PHP Метод

isDefined() публичный Метод

Returns true if a widget exists in the widget list, false if otherwise.
public isDefined ( string $module, string $action ) : boolean
$module string The controller name of the widget.
$action string The controller action of the widget.
Результат boolean
    public function isDefined($module, $action)
    {
        foreach ($this->widgets as $widget) {
            if ($widget->getModule() === $module && $widget->getAction() === $action) {
                return true;
            }
        }
        return false;
    }