public function getParameters(array $parameters = [])
    {
        foreach (['view', 'this'] as $forbiddenKey) {
            if (array_key_exists($forbiddenKey, $parameters)) {
                throw new \ErrorException('The "' . $forbiddenKey . '" key is forbidden.');
            }
        }
        $sharedVariables = $this->getOptionDefault('shared_variables');
        if ($sharedVariables) {
            $parameters = array_merge($sharedVariables, $parameters);
        }
        $parameters['view'] = $this;

        return $parameters;
    }
public function getParameters(array $parameters = [])
    {
        foreach (['view', 'this'] as $forbiddenKey) {
            if (array_key_exists($forbiddenKey, $parameters)) {
                throw new \ErrorException('The "' . $forbiddenKey . '" key is forbidden.');
            }
        }
        $sharedVariables = $this->getOptionDefault('shared_variables');
        if ($sharedVariables) {
            $parameters = array_merge($sharedVariables, $parameters);
        }
        $parameters['view'] = $this;

        return $parameters;
    }
public function getParameters ( array $ parameters = [ ] ) { foreach ( [ 'view' , 'this' ] as $ forbiddenKey ) { if ( array_key_exists ( $ forbiddenKey , $ parameters ) ) { throw new \ ErrorException ( 'The "' . $ forbiddenKey . '" key is forbidden.' ) ; } } $ sharedVariables = $ this -> getOptionDefault ( 'shared_variables' ) ; if ( $ sharedVariables ) { $ parameters = array_merge ( $ sharedVariables , $ parameters ) ; } $ parameters [ 'view' ] = $ this ; return $ parameters ; }
Prepare and group input and global parameters.

@param array $parameters

@throws \ErrorException when a forbidden parameter key is used

@return array input parameters with global parameters
Prepare and group input and global parameters .