Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

ParameterProviderRegistry.php
Go to the documentation of this file.
1 <?php
2
7 namespace eZ\Publish\Core\MVC\Symfony\FieldType\View;
8
9 use InvalidArgumentException;
10
11 class ParameterProviderRegistry implements ParameterProviderRegistryInterface
12 {
13 protected $providers = [];
14
22 public function hasParameterProvider($fieldTypeIdentifier)
23 {
24 return isset($this->providers[$fieldTypeIdentifier]);
25 }
26
36 public function getParameterProvider($fieldTypeIdentifier)
37 {
38 if (!isset($this->providers[$fieldTypeIdentifier])) {
39 throw new InvalidArgumentException("No parameter provider found for '$fieldTypeIdentifier' field type.");
40 }
41
42 return $this->providers[$fieldTypeIdentifier];
43 }
44
51 public function setParameterProvider(ParameterProviderInterface $parameterProvider, $fieldTypeIdentifier)
52 {
53 $this->providers[$fieldTypeIdentifier] = $parameterProvider;
54 }
55 }
eZ\Publish\Core\MVC\Symfony\FieldType\View\ParameterProviderRegistry
Definition: ParameterProviderRegistry.php:12
eZ\Publish\Core\MVC\Symfony\FieldType\View\ParameterProviderRegistry\getParameterProvider
getParameterProvider($fieldTypeIdentifier)
Returns parameter provider for given field type identifier.
Definition: ParameterProviderRegistry.php:36
eZ\Publish\Core\MVC\Symfony\FieldType\View\ParameterProviderRegistry\setParameterProvider
setParameterProvider(ParameterProviderInterface $parameterProvider, $fieldTypeIdentifier)
Sets a parameter provider for given field type identifier.
Definition: ParameterProviderRegistry.php:51
eZ\Publish\Core\MVC\Symfony\FieldType\View\ParameterProviderRegistry\hasParameterProvider
hasParameterProvider($fieldTypeIdentifier)
Checks if a parameter provider is set for a given field type identifier.
Definition: ParameterProviderRegistry.php:22
eZ\Publish\Core\MVC\Symfony\FieldType\View\ParameterProviderRegistry\$providers
$providers
Definition: ParameterProviderRegistry.php:13
eZ\Publish\Core\MVC\Symfony\FieldType\View\ParameterProviderInterface
Interface for services providing additional parameters to a fieldtype's view template (using ez_rende...
Definition: ParameterProviderInterface.php:18
eZ\Publish\Core\MVC\Symfony\FieldType\View\ParameterProviderRegistryInterface
Interface for fieldtypes view parameter provider registry.
Definition: ParameterProviderRegistryInterface.php:13
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.