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

FieldTypeCollectionFactory.php
Go to the documentation of this file.
1 <?php
2
7 namespace eZ\Publish\Core\Base\Container\ApiLoader;
8
9 use Symfony\Component\DependencyInjection\ContainerAwareInterface;
10 use Symfony\Component\DependencyInjection\ContainerAwareTrait;
11
12 class FieldTypeCollectionFactory implements ContainerAwareInterface
13 {
14 use ContainerAwareTrait;
15
21 protected $fieldTypes = [];
22
28 private $concreteFieldTypesIdentifiers = [];
29
37 public function registerFieldType($fieldTypeServiceId, $fieldTypeAlias)
38 {
39 $container = $this->container;
40 $this->fieldTypes[$fieldTypeAlias] = function () use ($container, $fieldTypeServiceId) {
41 return $container->get($fieldTypeServiceId);
42 };
43 }
44
50 public function getFieldTypes()
51 {
52 return $this->fieldTypes;
53 }
54
60 public function registerConcreteFieldTypeIdentifier($fieldTypeIdentifier)
61 {
62 $this->concreteFieldTypesIdentifiers[] = $fieldTypeIdentifier;
63 }
64
65 public function getConcreteFieldTypesIdentifiers()
66 {
67 return $this->concreteFieldTypesIdentifiers;
68 }
69 }
eZ\Publish\Core\Base\Container\ApiLoader\FieldTypeCollectionFactory
Definition: FieldTypeCollectionFactory.php:13
eZ\Publish\Core\Base\Container\ApiLoader\FieldTypeCollectionFactory\registerFieldType
registerFieldType($fieldTypeServiceId, $fieldTypeAlias)
Registers an eZ Publish field type.
Definition: FieldTypeCollectionFactory.php:37
eZ\Publish\Core\Base\Container\ApiLoader\FieldTypeCollectionFactory\getConcreteFieldTypesIdentifiers
getConcreteFieldTypesIdentifiers()
Definition: FieldTypeCollectionFactory.php:65
eZ\Publish\Core\Base\Container\ApiLoader\FieldTypeCollectionFactory\getFieldTypes
getFieldTypes()
Returns registered field types (as closures to be lazy loaded in the public API).
Definition: FieldTypeCollectionFactory.php:50
eZ\Publish\Core\Base\Container\ApiLoader\FieldTypeCollectionFactory\$fieldTypes
$fieldTypes
Definition: FieldTypeCollectionFactory.php:21
eZ\Publish\Core\Base\Container\ApiLoader\FieldTypeCollectionFactory\$concreteFieldTypesIdentifiers
$concreteFieldTypesIdentifiers
Definition: FieldTypeCollectionFactory.php:28
eZ\Publish\Core\Base\Container\ApiLoader\FieldTypeCollectionFactory\registerConcreteFieldTypeIdentifier
registerConcreteFieldTypeIdentifier($fieldTypeIdentifier)
Registers $fieldTypeIdentifier as "concrete" FieldType (i.e.
Definition: FieldTypeCollectionFactory.php:60
eZ\Publish\Core\Base\Container\ApiLoader
Definition: FieldTypeCollectionFactory.php:7
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.