public function getConfigurator(string $name): FieldSetConfigurator
    {
        if (!isset($this->configurators[$name])) {
            if (isset($this->serviceIds[$name])) {
                $configurator = $this->container->get($this->serviceIds[$name]);
            } elseif (class_exists($name)) {
                // Support fully-qualified class names.
                $configurator = new $name();
            } else {
                throw new InvalidArgumentException(sprintf('Could not load FieldSet configurator "%s".', $name));
            }

            if (!$configurator instanceof FieldSetConfigurator) {
                throw new InvalidArgumentException(sprintf('Configurator class "%s" is expected to be an instance of '.FieldSetConfigurator::class, $name));
            }

            $this->configurators[$name] = $configurator;
        }

        return $this->configurators[$name];
    }
public function getConfigurator(string $name): FieldSetConfigurator
    {
        if (!isset($this->configurators[$name])) {
            if (isset($this->serviceIds[$name])) {
                $configurator = $this->container->get($this->serviceIds[$name]);
            } elseif (class_exists($name)) {
                // Support fully-qualified class names.
                $configurator = new $name();
            } else {
                throw new InvalidArgumentException(sprintf('Could not load FieldSet configurator "%s".', $name));
            }

            if (!$configurator instanceof FieldSetConfigurator) {
                throw new InvalidArgumentException(sprintf('Configurator class "%s" is expected to be an instance of '.FieldSetConfigurator::class, $name));
            }

            $this->configurators[$name] = $configurator;
        }

        return $this->configurators[$name];
    }
public function getConfigurator ( string $ name ) : FieldSetConfigurator { if ( ! isset ( $ this -> configurators [ $ name ] ) ) { if ( isset ( $ this -> serviceIds [ $ name ] ) ) { $ configurator = $ this -> container -> get ( $ this -> serviceIds [ $ name ] ) ; } elseif ( class_exists ( $ name ) ) { // Support fully-qualified class names. $ configurator = new $ name ( ) ; } else { throw new InvalidArgumentException ( sprintf ( 'Could not load FieldSet configurator "%s".' , $ name ) ) ; } if ( ! $ configurator instanceof FieldSetConfigurator ) { throw new InvalidArgumentException ( sprintf ( 'Configurator class "%s" is expected to be an instance of ' . FieldSetConfigurator :: class , $ name ) ) ; } $ this -> configurators [ $ name ] = $ configurator ; } return $ this -> configurators [ $ name ] ; }
Returns a FieldSetConfigurator by name.

@param string $name The name of the FieldSet configurator

@throws InvalidArgumentException if the configurator can not be retrieved

@return FieldSetConfigurator
Returns a FieldSetConfigurator by name .