Skip to content

Commit

Permalink
Merge 188afbb into f561360
Browse files Browse the repository at this point in the history
  • Loading branch information
jmverges committed Aug 2, 2015
2 parents f561360 + 188afbb commit 3ca8113
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 5 deletions.
6 changes: 4 additions & 2 deletions Classes/Command/BuilderCommandController.php
Expand Up @@ -210,6 +210,7 @@ public function listCommand($detail = FALSE, $active = NULL, $inactive = FALSE,
* @param string $title The title of the resulting extension, by default "Provider extension for $enabledFeaturesList"
* @param string $description The description of the resulting extension, by default "Provider extension for $enabledFeaturesList"
* @param boolean $useVhs If TRUE, adds the VHS extension as dependency - recommended, on by default
* @param boolean $useFluidcontentCore If TRUE, adds the FluidcontentCore extension as dependency - recommended, on by default
* @param boolean $pages If TRUE, generates basic files for implementing Fluid Page templates
* @param boolean $content IF TRUE, generates basic files for implementing Fluid Content templates
* @param boolean $backend If TRUE, generates basic files for implementing Fluid Backend modules
Expand All @@ -218,15 +219,16 @@ public function listCommand($detail = FALSE, $active = NULL, $inactive = FALSE,
* @param boolean $verbose If FALSE, suppresses a lot of the otherwise output messages (to STDOUT)
* @return void
*/
public function providerExtensionCommand($extensionKey, $author, $title = NULL, $description = NULL, $useVhs = TRUE, $pages = TRUE, $content = TRUE, $backend = FALSE, $controllers = TRUE, $dry = FALSE, $verbose = TRUE) {
public function providerExtensionCommand($extensionKey, $author, $title = NULL, $description = NULL, $useVhs = TRUE, $useFluidcontentCore = TRUE, $pages = TRUE, $content = TRUE, $backend = FALSE, $controllers = TRUE, $dry = FALSE, $verbose = TRUE) {
$useVhs = (boolean) $useVhs;
$useFluidcontentCore = (boolean) $useFluidcontentCore;
$pages = (boolean) $pages;
$content = (boolean) $content;
$backend = (boolean) $backend;
$controllers = (boolean) $controllers;
$verbose = (boolean) $verbose;
$dry = (boolean) $dry;
$extensionGenerator = $this->extensionService->buildProviderExtensionGenerator($extensionKey, $author, $title, $description, $controllers, $pages, $content, $backend, $useVhs);
$extensionGenerator = $this->extensionService->buildProviderExtensionGenerator($extensionKey, $author, $title, $description, $controllers, $pages, $content, $backend, $useVhs, $useFluidcontentCore);
$extensionGenerator->setDry($dry);
$extensionGenerator->setVerbose($verbose);
$extensionGenerator->generate();
Expand Down
5 changes: 3 additions & 2 deletions Classes/Controller/BackendController.php
Expand Up @@ -113,12 +113,13 @@ public function buildFormAction($view = 'BuildForm') {
* @param boolean $content
* @param boolean $backend
* @param boolean $vhs
* @param boolean $fluidcontentCore
* @param boolean $dry
* @param boolean $verbose
* @return void
*/
public function buildAction($name, $author, $title, $description, $controllers, $pages, $content, $backend, $vhs, $dry, $verbose) {
$generator = $this->extensionService->buildProviderExtensionGenerator($name, $author, $title, $description, $controllers, $pages, $content, $backend, $vhs);
public function buildAction($name, $author, $title, $description, $controllers, $pages, $content, $backend, $vhs, $fluidcontentCore, $dry, $verbose) {
$generator = $this->extensionService->buildProviderExtensionGenerator($name, $author, $title, $description, $controllers, $pages, $content, $backend, $vhs, $fluidcontentCore);
$generator->setVerbose($verbose);
$generator->setDry($dry);
if (FALSE === $dry) {
Expand Down
6 changes: 5 additions & 1 deletion Classes/Service/ExtensionService.php
Expand Up @@ -66,9 +66,10 @@ public function injectObjectManager( ObjectManagerInterface $objectManager) {
* @param boolean $content Include use of fluidcontent
* @param boolean $backend Include use of fluidbackend
* @param boolean $useVhs Include VHS as dependency
* @param boolean $useFluidcontentCore Include FluidcontentCore as dependency
* @return ExtensionGenerator
*/
public function buildProviderExtensionGenerator($extensionKey, $author, $title = NULL, $description = NULL, $controllers = FALSE, $pages = TRUE, $content = TRUE, $backend = FALSE, $useVhs = TRUE) {
public function buildProviderExtensionGenerator($extensionKey, $author, $title = NULL, $description = NULL, $controllers = FALSE, $pages = TRUE, $content = TRUE, $backend = FALSE, $useVhs = TRUE, $useFluidcontentCore = TRUE) {
$defaultTitle = 'Provider extension for ' . (TRUE === $pages ? 'pages ' : '') . (TRUE === $content ? 'content ' : '') . (TRUE === $backend ? 'backend' : '');;
if (NULL === $title) {
$title = $defaultTitle;
Expand All @@ -89,6 +90,9 @@ public function buildProviderExtensionGenerator($extensionKey, $author, $title =
if (TRUE === $useVhs) {
array_push($dependencies, 'vhs');
}
if (TRUE === $useFluidcontentCore) {
array_push($dependencies, 'fluidcontent_core');
}
$dependenciesArrayString = '';
foreach ($dependencies as $dependency) {
$dependenciesArrayString .= "\n\t\t\t'" . $dependency . "' => '',";
Expand Down
3 changes: 3 additions & 0 deletions Resources/Private/Language/locallang.xlf
Expand Up @@ -72,6 +72,9 @@
<trans-unit id="providerextension.vhs" xml:space="preserve">
<source>Set the VHS extension as dependency</source>
</trans-unit>
<trans-unit id="providerextension.fluidcontentCore" xml:space="preserve">
<source>Set the FluidcontentCore extension as dependency</source>
</trans-unit>
<trans-unit id="buildBehavior" xml:space="preserve">
<source>Build behavior</source>
</trans-unit>
Expand Down
1 change: 1 addition & 0 deletions Resources/Private/Templates/Backend/BuildForm.html
Expand Up @@ -33,6 +33,7 @@ <h4><f:translate key="toggles" /></h4>
<f:render section="Checkbox" arguments="{name: 'backend'}" />
<f:render section="Checkbox" arguments="{name: 'controllers'}" />
<f:render section="Checkbox" arguments="{name: 'vhs', checked: 'checked'}" />
<f:render section="Checkbox" arguments="{name: 'fluidcontentCore', checked: 'fluidcontentCore'}" />
<h4><f:translate key="buildBehavior" /></h4>
<f:render section="Checkbox" arguments="{name: 'dry', checked: 'checked'}" />
<f:render section="Checkbox" arguments="{name: 'verbose'}" />
Expand Down

0 comments on commit 3ca8113

Please sign in to comment.