/** * @param ContainerInterface $container The container * @param Filesystem $filesystem The filesytem * @param string $skeletonDir The skeleton directory */ public function __construct(ContainerInterface $container, Filesystem $filesystem, $skeletonDir) { $this->container = $container; $this->filesystem = $filesystem; $this->skeletonDir = $skeletonDir; $this->fullSkeletonDir = GeneratorUtils::getFullSkeletonPath($skeletonDir); }
/** * Install the default pagepart configuration. * * @param BundleInterface $bundle */ protected function installDefaultPagePartConfiguration($bundle) { // Pagepart configuration $dirPath = sprintf('%s/Resources/config/pageparts/', $bundle->getPath()); $skeletonDir = sprintf('%s/Resources/config/pageparts/', GeneratorUtils::getFullSkeletonPath('/common')); // Only copy when folder does not exist yet if (!$this->filesystem->exists($dirPath)) { $files = array('footer.yml', 'main.yml', 'left-sidebar.yml', 'right-sidebar.yml'); foreach ($files as $file) { $this->filesystem->copy($skeletonDir . $file, $dirPath . $file, false); } } }
/** * KunstmaanTestBundle_TestEntity: resource: "@KunstmaanTestBundle/Controller/TestEntityAdminListController.php" type: annotation prefix: /{_locale}/admin/testentity/ requirements: _locale: %requiredlocales% */ protected function createGenerator() { return new AdminListGenerator($this->getContainer()->get('filesystem'), GeneratorUtils::getFullSkeletonPath('adminlist')); }
/** * KunstmaanTestBundle_TestEntity: * resource: "@KunstmaanTestBundle/Controller/TestEntityAdminListController.php" * type: annotation * prefix: /{_locale}/admin/testentity/ * requirements: * _locale: %requiredlocales% */ protected function createGenerator() { return new AdminListGenerator(GeneratorUtils::getFullSkeletonPath('adminlist')); }
/** * @param Filesystem $filesystem The filesytem * @param string $skeletonDir The skeleton directory */ public function __construct(Filesystem $filesystem, $skeletonDir) { $this->filesystem = $filesystem; $this->skeletonDir = $skeletonDir; $this->fullSkeletonDir = GeneratorUtils::getFullSkeletonPath($skeletonDir); }