src/Component/Frontend/StructureModal/StructureModal.php
protected function createComponentFormNoFile() : Form
    {
        $variables = $this->getNoFileVariables();
        $recipeSlug = $this->getRecipeSlug();
        $structure = $this->getStructure();
        $recipeVariables = [];

        if ($structure)
        {
            $structureValues = $this->structureValueRepository->findByStructure($structure);

            foreach ($structureValues as $structureValue)
            {
                $recipeVariableSlug = $structureValue->getRecipeVariable()->getSlug();
                $recipeVariables[$recipeVariableSlug] = $structureValue;
            }
        }

        $form = new Form;

        /**
         * @var string $variableSlug
         * @var RecipeVariable $recipeVariable
         */
        foreach ($variables->toKeyIndex('Slug') as $variableSlug => $recipeVariable)
        {
            $value = key_exists($variableSlug, $recipeVariables) ? $recipeVariables[$variableSlug] : NULL;

            $component = $this->IVariableFormBuilder->buildComponent($recipeSlug->getRecipe(), $recipeVariable, $structure, $value);
            $form->addComponent($component, $recipeVariable->getSlug());
        }

        $form->addSubmit('save');

        $form->onValidate[] = function (Form $form) { $this->validate($form); };
        $form->onSuccess[] = function (Form $form) { $this->successNoFile($form); };

        if (!$this->presenter->user->isAllowed(StructureAuthorizator::RES_STRUCTURE_MODAL))
        {
            $this->setDisabledForm($form, TRUE);
        }

        return $form;
    }
protected function createComponentFormNoFile() : Form
    {
        $variables = $this->getNoFileVariables();
        $recipeSlug = $this->getRecipeSlug();
        $structure = $this->getStructure();
        $recipeVariables = [];

        if ($structure)
        {
            $structureValues = $this->structureValueRepository->findByStructure($structure);

            foreach ($structureValues as $structureValue)
            {
                $recipeVariableSlug = $structureValue->getRecipeVariable()->getSlug();
                $recipeVariables[$recipeVariableSlug] = $structureValue;
            }
        }

        $form = new Form;

        /**
         * @var string $variableSlug
         * @var RecipeVariable $recipeVariable
         */
        foreach ($variables->toKeyIndex('Slug') as $variableSlug => $recipeVariable)
        {
            $value = key_exists($variableSlug, $recipeVariables) ? $recipeVariables[$variableSlug] : NULL;

            $component = $this->IVariableFormBuilder->buildComponent($recipeSlug->getRecipe(), $recipeVariable, $structure, $value);
            $form->addComponent($component, $recipeVariable->getSlug());
        }

        $form->addSubmit('save');

        $form->onValidate[] = function (Form $form) { $this->validate($form); };
        $form->onSuccess[] = function (Form $form) { $this->successNoFile($form); };

        if (!$this->presenter->user->isAllowed(StructureAuthorizator::RES_STRUCTURE_MODAL))
        {
            $this->setDisabledForm($form, TRUE);
        }

        return $form;
    }
Variables form
@return Form
@throws \Propel\Runtime\Exception\PropelException