Closed
Description
Currently, the adapters for the Templating component reside in the Form component (to be precise, in Symfony\Component\Form\Extension\Templating
) but the relevant templates are still located in FrameworkBundle. They should be moved to the Form's Templating extension before 2.2 to decouple Form from FrameworkBundle.
Plan
- move view files to
Form/Resources/views/
- move
FormHelper
toForm/Extension/Templating/
- make
TemplateNameParser
in FrameworkBundle accept namespaces ([FrameworkBundle] Made TemplateNameParser able to parse templates in the @-notation (#5660) #7818). - add "Form" namespace pointing to the Form component in FrameworkBundle
- replace "FrameworkBundle:Form" and "FrameworkBundle:FormTable" by "Form:DivLayout" and "Form:TableLayout" in
TemplateNameParser
- add
TemplateNameGeneratorInterface
toForm/Extension/Templating/
(see below) - create a
TemplateNameGenerator
in the Form component that is compatible withTemplateNameParser
in the Templating component - create a
TemplateNameGenerator
in FrameworkBundle that is compatible withTemplateNameParser
in FrameworkBundle - make
TemplatingRendererEngine::loadResourceFromTheme
use theTemplateNameGenerator
namespace Symfony\Component\Form\Extension\Templating;
interface TemplateNameGeneratorInterface
{
// e.g. ->generate('FrameworkBundle:Form', 'form_widget_simple')
// or ->generate('/path/to/Form/Resources/views/Form', 'form_widget_simple')
public function generate($theme, $block);
}