Neos\Flow\Http\Component\ComponentContext::setParameter PHP Méthode

setParameter() public méthode

public setParameter ( string $componentClassName, string $parameterName, mixed $value )
$componentClassName string
$parameterName string
$value mixed
    public function setParameter($componentClassName, $parameterName, $value)
    {
        if (!isset($this->parameters[$componentClassName])) {
            $this->parameters[$componentClassName] = [];
        }
        $this->parameters[$componentClassName][$parameterName] = $value;
    }

Usage Example

 /**
  * Set the routes configuration for the Neos setup and configures the routing component
  * to skip initialisation, which would overwrite the specific settings again.
  *
  * @param ComponentContext $componentContext
  * @return void
  */
 public function handle(ComponentContext $componentContext)
 {
     $configurationSource = $this->objectManager->get(\Neos\Flow\Configuration\Source\YamlSource::class);
     $routesConfiguration = $configurationSource->load($this->packageManager->getPackage('Neos.Setup')->getConfigurationPath() . ConfigurationManager::CONFIGURATION_TYPE_ROUTES);
     $this->router->setRoutesConfiguration($routesConfiguration);
     $componentContext->setParameter(\Neos\Flow\Mvc\Routing\RoutingComponent::class, 'skipRouterInitialization', true);
 }
All Usage Examples Of Neos\Flow\Http\Component\ComponentContext::setParameter