eZ\Publish\Core\Base\Container\ApiLoader\FieldTypeCollectionFactory::registerFieldType PHP Method

registerFieldType() public method

Field types are being registered as a closure so that they will be lazy loaded.
public registerFieldType ( string $fieldTypeServiceId, string $fieldTypeAlias )
$fieldTypeServiceId string The field type service Id
$fieldTypeAlias string The field type alias (e.g. "ezstring")
    public function registerFieldType($fieldTypeServiceId, $fieldTypeAlias)
    {
        $container = $this->container;
        $this->fieldTypes[$fieldTypeAlias] = function () use($container, $fieldTypeServiceId) {
            return $container->get($fieldTypeServiceId);
        };
    }