protected function checkRequiredParameters(array $options = null, $requiredParameters = [])
    {
        if (empty($options)) {
            throw new WidgetException('No params found!', $this->getName());
        }

        foreach ($requiredParameters as $parameter) {
            if (empty($options[$parameter])) {
                throw new WidgetParameterException(
                    'Required parameter ' . $parameter . ' not found or invalid!',
                    $this->widgetName,
                    $parameter
                );
            }
        }
    }