return registered form helper

@param       string      $helperType         helper type eg. tag, option, field, choise
@return      Map

@throws InvalidArgumentException
14791
public function getHelper($helperType)
    {
        if ($this->isValidKey($helperType)) {
            return $this->getHelperMap()->get($helperType);
        } else {
            throw new InvalidArgumentException('Invalid form helper type given');
        }
    }
339278
protected function getFormObjectArgument()
    {
        $objectArgument = $this->arguments['object'];

        if (null === $objectArgument) {
            return null;
        }

        if (false === is_object($objectArgument)) {
            throw InvalidOptionValueException::formViewHelperWrongFormValueType($objectArgument);
        }

        if (false === $objectArgument instanceof FormInterface) {
            throw InvalidOptionValueException::formViewHelperWrongFormValueObjectType($objectArgument);
        }

        $formClassName = $this->getFormClassName();

        if (false === $objectArgument instanceof $formClassName) {
            throw InvalidOptionValueException::formViewHelperWrongFormValueClassName($formClassName, $objectArgument);
        }

        return $objectArgument;
    }
1014973
public function setSenderType($senderType)
    {
        $allowedValues = $this->getSenderTypeAllowableValues();
        if (!in_array($senderType, $allowedValues)) {
            throw new \InvalidArgumentException(
                sprintf(
                    "Invalid value for 'senderType', must be one of '%s'",
                    implode("', '", $allowedValues)
                )
            );
        }
        $this->container['senderType'] = $senderType;

        return $this;
    }
888784
public function create($adapterType, array $config)
    {
        if (!array_key_exists($adapterType, $this->adapters)) {
            throw new \InvalidArgumentException(
                sprintf('Cache Adapter\'s key %s does not exist', $adapterType)
            );
        }

        /**
         * @fixme : Active this part & clean cache config
         */
        if (!isset($config[$adapterType])) {
            throw new InvalidConfigurationException(
                sprintf('Config is not set for adapter %s', $adapterType)
            );
        }

        return new $this->adapters[$adapterType]($config[$adapterType]);
    }
1179
public function registerHelper($name, $helper = false)
    {
        if (is_array($name)) {
            foreach ($name as $n => $helper) {
                $this->registerHelper($n, $helper);
            }
        } elseif (is_object($name)) {
            $this->registerJavascriptObject('helper', $this->wrapHelperObject($name));
        } elseif ($helper === false) {
            $this->registerJavascriptObject('helper', $name);
        } elseif (is_callable($helper)) {
            $this->registerJavascriptFunction('helper', $name, $this->wrapHelperCallable($name, $helper));
        } else {
            $this->registerJavascriptFunction('helper', $name, $helper);
        }
    }
704153
public function resolve($type)
    {
        if (!is_string($type)) {
            throw new InvalidArgumentException(
                'Can not resolve class ident: type must be a string'
            );
        }

        // Normalize requested type with prefix / suffix, if applicable.
        $type = $this->prefix.$type.$this->suffix;

        $capitalizeNext = function(&$i) {
            $i = ucfirst($i);
        };

        $capitals = $this->capitals;
        foreach ($capitals as $cap) {
            $expl = explode($cap, $type);
            array_walk($expl, $capitalizeNext);
            $type = implode($cap, $expl);
        }

        $replacements = $this->replacements;
        foreach ($replacements as $rep => $target) {
            $type = str_replace($rep, $target, $type);
        }

        $class = '\\'.trim($type, '\\');

        return $class;
    }
1047529
protected function getDomainMapper()
    {
        if ($this->domainMapper !== null) {
            return $this->domainMapper;
        }

        $this->domainMapper = new Helper\DomainMapper(
            $this->persistenceHandler->contentHandler(),
            $this->persistenceHandler->locationHandler(),
            $this->persistenceHandler->contentTypeHandler(),
            $this->getContentTypeDomainMapper(),
            $this->persistenceHandler->contentLanguageHandler(),
            $this->getFieldTypeRegistry()
        );

        return $this->domainMapper;
    }
1334658
public function map(callable $callable, bool $useKeyAsSecondParameter = false, ...$arguments): self
    {
        $useArguments = \func_num_args() > 2;

        return static::create(
            function () use ($useArguments, $callable, $useKeyAsSecondParameter, $arguments) {
                foreach ($this->getGenerator() as $key => $value) {
                    if ($useArguments) {
                        if ($useKeyAsSecondParameter) {
                            yield $key => $callable($value, $key, ...$arguments);
                        } else {
                            yield $key => $callable($value, ...$arguments);
                        }
                    } else {
                        /** @noinspection NestedPositiveIfStatementsInspection */
                        if ($useKeyAsSecondParameter) {
                            yield $key => $callable($value, $key);
                        } else {
                            yield $key => $callable($value);
                        }
                    }
                }
            },
            $this->iteratorClass,
            false
        );
    }
492219
public function get($name)
    {
        if (!$this->has($name)) {
            throw new InvalidArgumentException(sprintf('The helper "%s" is not defined.', $name));
        }

        return $this->helpers[$name];
    }
1327880
final protected function getFormAdminType(FormMapper $formMapper, AdminInterface $admin, $formField, $field, $fieldOptions = [], $adminOptions = [])
    {
        $adminOptions = array_merge([
            'edit' => 'list',
            'translation_domain' => 'SonataClassificationBundle',
        ], $adminOptions);

        $fieldDescription = $admin->getModelManager()->getNewFieldDescriptionInstance($admin->getClass(), $field, $adminOptions);
        $fieldDescription->setAssociationAdmin($admin);
        $fieldDescription->setAdmin($formMapper->getAdmin());
        $fieldDescription->setAssociationMapping([
            'fieldName' => $field,
            'type' => ClassMetadataInfo::MANY_TO_ONE,
        ]);

        $fieldOptions = array_merge([
            'sonata_field_description' => $fieldDescription,
            'class' => $admin->getClass(),
            'model_manager' => $admin->getModelManager(),
            'required' => false,
        ], $fieldOptions);

        return $formMapper->create($formField, ModelTypeList::class, $fieldOptions);
    }
534262
private function getMapping(TypeInterface $type)
    {
        $type = (string) $type->getType();

        if (!isset($this->mappings[$type])) {
            throw new \InvalidArgumentException(sprintf('The mapping for type "%s" could not be found.', $type));
        }

        return $this->mappings[$type];
    }
686554
public function setForm($formOrContainer)
    {
        if (!$formOrContainer instanceof FormInterface
            && !$formOrContainer instanceof Container
        ) {
            throw new \InvalidArgumentException('Parameter must be either of type "\Zend\Form\FormInterface" or "\Core\Form\Container"');
        }

        $this->form = $formOrContainer;
        $this->generateCheckboxes();

        return $this;
    }
423770
public function createHelper($helper, array $config = array())
    {
        if(is_string($helper) && strpos($helper, '.') === false )
        {
            $identifier = $this->getIdentifier()->toArray();
            $identifier['name'] = $helper;
        }
        else $identifier = $helper;

        //Create the template helper
        $helper = $this->getObject($identifier, $config);

        //Check the helper interface
        if (!($helper instanceof TemplateHelperInterface))
        {
            throw new \UnexpectedValueException(
                "Template helper $identifier does not implement TemplateHelperInterface"
            );
        }

        return $helper;
    }
1043272
public function helper($helper)
    {
        $helperPath = $this->getHelperPath($helper);

        if ($helperPath === null) {
            throw new InvalidArgumentException("Helper [{$helper}] not found.");
        }

        $args = func_get_args();
        unset($args[0]);

        $callback = include($helperPath);

        if (!is_callable($callback)) {
            throw new BadFunctionCallException("Helper [{$helper}] is invalid.");
        }

        return call_user_func_array($callback, $args);
    }
742749
public function interactWith(
        FormInterface $form,
        HelperSet $helperSet,
        InputInterface $input,
        OutputInterface $output
    ) {
        if (!$input->isInteractive()) {
            throw new CanNotInteractWithForm('This interactor only works with interactive input');
        }

        $question = $this->transformerResolver->resolve($form)->transform($form);

        return $this->questionHelper($helperSet)->ask($input, $output, $question);
    }
1079737
public function rules($type)
	{
		$type = strtolower(trim($type));

		if (!isset($this->rules[$type]))
		{
			throw new InvalidArgumentException(sprintf('Rule type of %s not supported', $type));
		}

		return $this->rules[$type];
	}
1016923
protected function getHelper($class) {
    if (!isset($this->helpers[$class])) {
      $qualified_class = '\DrupalCodeBuilder\Task\Generate\\' . $class;

      switch ($class) {
        case 'ComponentDataInfoGatherer':
          $helper = new $qualified_class($this->getHelper('ComponentClassHandler'));
          break;
        case 'ComponentCollector':
          $helper = new $qualified_class(
            $this->environment,
            $this->getHelper('ComponentClassHandler'),
            $this->getHelper('ComponentDataInfoGatherer')
          );
          break;
        default:
          $helper = new $qualified_class();
          break;
      }

      $this->helpers[$class] = $helper;
    }

    return $this->helpers[$class];
  }