@@ 156-167 (lines=12) @@ | ||
153 | * @param array $config The CKEditor configuration. |
|
154 | * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container The container. |
|
155 | */ |
|
156 | private function registerStylesSet(array $config, ContainerBuilder $container) |
|
157 | { |
|
158 | if (empty($config['styles'])) { |
|
159 | return; |
|
160 | } |
|
161 | ||
162 | $definition = $container->getDefinition('ivory_ck_editor.styles_set_manager'); |
|
163 | ||
164 | foreach ($config['styles'] as $name => $stylesSet) { |
|
165 | $definition->addMethodCall('setStylesSet', array($name, $this->fixStylesSet($stylesSet))); |
|
166 | } |
|
167 | } |
|
168 | ||
169 | /** |
|
170 | * Registers the CKEditor templates. |
|
@@ 175-186 (lines=12) @@ | ||
172 | * @param array $config The CKEditor configuration. |
|
173 | * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container The container. |
|
174 | */ |
|
175 | private function registerTemplates(array $config, ContainerBuilder $container) |
|
176 | { |
|
177 | if (empty($config['templates'])) { |
|
178 | return; |
|
179 | } |
|
180 | ||
181 | $definition = $container->getDefinition('ivory_ck_editor.template_manager'); |
|
182 | ||
183 | foreach ($config['templates'] as $name => $template) { |
|
184 | $definition->addMethodCall('setTemplate', array($name, $template)); |
|
185 | } |
|
186 | } |
|
187 | ||
188 | /** |
|
189 | * Merges the toolbars into the CKEditor configs. |