@@ 169-181 (lines=13) @@ | ||
166 | * |
|
167 | * @return $generator |
|
168 | */ |
|
169 | protected function getEntityGenerator() |
|
170 | { |
|
171 | $dirs[] = $this->getContainer()->get('file_locator')->locate('@VictoireWidgetBundle/Resources/skeleton/'); |
|
172 | $dirs[] = $this->getContainer()->get('file_locator')->locate('@VictoireWidgetBundle/Resources/'); |
|
173 | ||
174 | $generator = $this->createEntityGenerator(); |
|
175 | ||
176 | $this->skeletonDirs = array_merge($this->getSkeletonDirs(), $dirs); |
|
177 | $generator->setSkeletonDirs($this->skeletonDirs); |
|
178 | $this->setGenerator($generator); |
|
179 | ||
180 | return $generator; |
|
181 | } |
|
182 | ||
183 | /** |
|
184 | * get a generator for given widget and type, and attach it skeleton dirs. |
|
@@ 188-200 (lines=13) @@ | ||
185 | * |
|
186 | * @return $generator |
|
187 | */ |
|
188 | protected function getGenerator(BundleInterface $bundle = null) |
|
189 | { |
|
190 | $dirs[] = $this->getContainer()->get('file_locator')->locate('@VictoireWidgetBundle/Resources/skeleton/'); |
|
191 | $dirs[] = $this->getContainer()->get('file_locator')->locate('@VictoireWidgetBundle/Resources/'); |
|
192 | ||
193 | $generator = $this->createWidgetGenerator(); |
|
194 | ||
195 | $this->skeletonDirs = array_merge($this->getSkeletonDirs(), $dirs); |
|
196 | $generator->setSkeletonDirs($this->skeletonDirs); |
|
197 | $this->setGenerator($generator); |
|
198 | ||
199 | return $generator; |
|
200 | } |
|
201 | ||
202 | /** |
|
203 | * Collect options and arguments. |