eZ\Publish\Core\Base\Container\ApiLoader\FieldTypeNameableCollectionFactory::registerNameableFieldType PHP Method

registerNameableFieldType() public method

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