protected function checkParameters($parameters, $requirements = true)
    {
        if (is_array($parameters)) {
            $parameters = array_replace($this->getParameters(), $parameters);
        }
        $obstacles = $this->collectRenderingObstacles($parameters, $requirements);
        if ($obstacles) {
            throw new WidgetInvalidRenderingParametersException(reset($obstacles));
        }
        return $parameters;
    }