| @@ 56-67 (lines=12) @@ | ||
| 53 | * @param TranslatorInterface $translator |
|
| 54 | * @param Twig_Environment $twig |
|
| 55 | */ |
|
| 56 | public function __construct( |
|
| 57 | ConfigurationFactory $configurationFactory, |
|
| 58 | TranslatorInterface $translator, |
|
| 59 | Twig_Environment $twig |
|
| 60 | ) { |
|
| 61 | $this->configuration = $configurationFactory->getApplicationConfiguration(); |
|
| 62 | $this->fieldsMapping = $this |
|
| 63 | ->configuration |
|
| 64 | ->getParameter('fields_mapping'); // shortcut to field mapping array |
|
| 65 | $this->translator = $translator; |
|
| 66 | $this->twig = $twig; |
|
| 67 | } |
|
| 68 | ||
| 69 | /** |
|
| 70 | * Create a new field with its renderer. |
|
| @@ 59-69 (lines=11) @@ | ||
| 56 | * @param ConfigurationFactory $configurationFactory |
|
| 57 | * @param Twig_Environment $twig |
|
| 58 | */ |
|
| 59 | public function __construct( |
|
| 60 | RouterInterface $router, |
|
| 61 | TranslatorInterface $translator, |
|
| 62 | ConfigurationFactory $configurationFactory, |
|
| 63 | Twig_Environment $twig |
|
| 64 | ) { |
|
| 65 | $this->router = $router; |
|
| 66 | $this->translator = $translator; |
|
| 67 | $this->configuration = $configurationFactory->getApplicationConfiguration(); |
|
| 68 | $this->twig = $twig; |
|
| 69 | } |
|
| 70 | ||
| 71 | /** |
|
| 72 | * @return array |
|