protected function collectRenderingObstacles($parameters, $requirements = true)
    {
        if ( ! is_array($parameters)) {
            return ['Parameters should be an array'];
        }
        if (true === $requirements) {
            $requirements = $this->getRequiredParameters();
        }
        $obstacles = [];
        foreach ($requirements as $requiredParameterName) {
            if (empty($parameters[$requiredParameterName])) {
                $obstacles[] = "Parameter '".$requiredParameterName."' is required";
            }
        }
        return $obstacles;
    }
protected function collectRenderingObstacles($parameters, $requirements = true)
    {
        if ( ! is_array($parameters)) {
            return ['Parameters should be an array'];
        }
        if (true === $requirements) {
            $requirements = $this->getRequiredParameters();
        }
        $obstacles = [];
        foreach ($requirements as $requiredParameterName) {
            if (empty($parameters[$requiredParameterName])) {
                $obstacles[] = "Parameter '".$requiredParameterName."' is required";
            }
        }
        return $obstacles;
    }
protected function collectRenderingObstacles ( $ parameters , $ requirements = true ) { if ( ! is_array ( $ parameters ) ) { return [ 'Parameters should be an array' ] ; } if ( true === $ requirements ) { $ requirements = $ this -> getRequiredParameters ( ) ; } $ obstacles = [ ] ; foreach ( $ requirements as $ requiredParameterName ) { if ( empty ( $ parameters [ $ requiredParameterName ] ) ) { $ obstacles [ ] = "Parameter '" . $ requiredParameterName . "' is required" ; } } return $ obstacles ; }
Returns an array of possible problems for rendering widget or of some widget rendering functionality

@param $parameters
@param bool|array $requirements - required parameter names or true for getting them from getRequiredParameters()
@return array
Returns an array of possible problems for rendering widget or of some widget rendering functionality