Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GeneratorBundle] refactored page generator #2235

Merged
merged 2 commits into from
Jan 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Kunstmaan/GeneratorBundle/Command/GeneratePageCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ protected function doExecute()
if (count($this->parentPages) == 0) {
$this->assistant->writeLine(array(
'To use this page you must first add the definition below to the <comment>getPossibleChildTypes</comment> funtion of the parent page:',
'<comment> array(</comment>',
'<comment> [</comment>',
"<comment> 'name' => '".$this->pageName."',</comment>",
"<comment> 'class'=> '".$this->bundle->getNamespace().'\\Entity\\Pages\\'.$this->pageName."'</comment>",
'<comment> ),</comment>',
'<comment> ],</comment>',
'',
));
}
Expand Down Expand Up @@ -237,7 +237,7 @@ protected function createGenerator()
$filesystem = $this->getContainer()->get('filesystem');
$registry = $this->getContainer()->get('doctrine');

return new PageGenerator($filesystem, $registry, '/page', $this->assistant);
return new PageGenerator($filesystem, $registry, '/page', $this->assistant, $this->getContainer());
}

/**
Expand Down
Loading