@param LocationSwapData|null $data
@param null|string $name

@return FormInterface
15155
public function swapLocation(
        LocationSwapData $data = null,
        ?string $name = null
    ): FormInterface {
        $name = $name ?: StringUtil::fqcnToBlockPrefix(LocationSwapType::class);

        return $this->formFactory->createNamed($name, LocationSwapType::class, $data);
    }
1363000
public function updateRole(
        RoleUpdateData $data,
        ?string $name = null
    ): FormInterface {
        $name = $name ?: sprintf('update-role-%d', $data->getRole()->id);

        return $this->formFactory->createNamed($name, RoleUpdateType::class, $data);
    }
844884
public function updateContentObjectState(
        ContentObjectStateUpdateData $data,
        ?string $name = null
    ): FormInterface {
        $name = $name ?: sprintf('update-content-%d-object-state-group-%d', $data->getContentInfo()->id,
            $data->getObjectStateGroup()->id);

        return $this->formFactory->createNamed($name, ContentObjectStateUpdateType::class, $data);
    }
256760
public function addContentTypeTranslation(
        TranslationAddData $data = null,
        ?string $name = null
    ): FormInterface {
        $name = $name ?: 'add-translation';

        return $this->formFactory->createNamed($name, TranslationAddType::class, $data);
    }
1142259
public function updateCron(
        EdgarEzCron $data,
        ?string $name = null
    ): ?FormInterface {
        $name = $name ?: sprintf('update-cron-%s', $data->getAlias());

        return $this->formFactory->createNamed(
            $name,
            CronType::class,
            $data,
            [
                'method' => Request::METHOD_POST,
                'csrf_protection' => true,
            ]
        );
    }
979982
public function forgotUserPasswordWithLogin(
        UserPasswordForgotWithLoginData $data = null,
        ?string $name = null
    ): FormInterface {
        $name = $name ?: StringUtil::fqcnToBlockPrefix(UserPasswordForgotWithLoginType::class);

        return $this->formFactory->createNamed($name, UserPasswordForgotWithLoginType::class, $data);
    }
218902
public function deletePolicy(
        PolicyDeleteData $data,
        ?string $name = null
    ): FormInterface {
        $name = $name ?: sprintf('delete-policy-%s', md5(implode('/', $data->getPolicy())));

        return $this->formFactory->createNamed($name, PolicyDeleteType::class, $data);
    }
1207098
public function deletePolicies(
        PoliciesDeleteData $data = null,
        ?string $name = null
    ): FormInterface {
        $name = $name ?: StringUtil::fqcnToBlockPrefix(PoliciesDeleteType::class);

        return $this->formFactory->createNamed($name, PoliciesDeleteType::class, $data);
    }
448263
static function laraform($name, $attributes = null, array $data = []) {
        $el = new ElementSelectTwbs($name, $attributes, $data);
        $el->addClass('form-control');
        return $el;
    }
67007
public function updateSection(
        SectionUpdateData $data = null,
        ?string $name = null
    ): FormInterface {
        $name = $name ?: sprintf('update-section-%d', $data->getSection()->id);

        return $this->formFactory->createNamed($name, SectionUpdateType::class, $data);
    }
26514
public function updatePolicy(
        PolicyUpdateData $data,
        ?string $name = null
    ): FormInterface {
        $name = $name ?: sprintf('update-policy-%s', md5(implode('/', $data->getPolicy())));

        return $this->formFactory->createNamed($name, PolicyUpdateType::class, $data);
    }
351745
static public function token($name=null, $data=null)
    {
        if (!is_null($name) && is_null($data) && (is_numeric($name) || is_array($name) || $name=='')) {
            $data = $name;
            $name = null;
        }
        
        return (new FormToken())->form($name, $data);
    }
1279266
public function updateContentTypeGroup(
        ContentTypeGroupUpdateData $data = null,
        ?string $name = null
    ): FormInterface {
        $name = $name ?: sprintf('update-content-type-group-%d', $data->getContentTypeGroup()->id);

        return $this->formFactory->createNamed($name, ContentTypeGroupUpdateType::class, $data);
    }
582815
public function deleteUser(
        UserDeleteData $data = null,
        ?string $name = null
    ): FormInterface {
        $name = $name ?: StringUtil::fqcnToBlockPrefix(UserDeleteType::class);

        return $this->formFactory->createNamed($name, UserDeleteType::class, $data);
    }
756902
public function create(string $name, $data = null): AbstractRepository
    {
        if (!$this->has($name)) {
            throw new InvalidRepositoryFactoryException(sprintf(
                'Factory `%s` does not exists.', $name
            ));
        }

        return $this->factories[$name]->create($data);
    }
1047594
public function updateObjectState(
        ObjectStateUpdateData $data = null,
        ?string $name = null
    ): FormInterface {
        $name = $name ?: sprintf('update-object-state-%d', $data->getObjectState()->id);

        return $this->formFactory->createNamed($name, ObjectStateUpdateType::class, $data);
    }
959076
public static function newInstance($name, $data = null)
  {
    if (!is_array($data)) {
      $data = array();
    }

    $config = self::getInstance($name);
    $config->_data = $data;

    return $config;
  }