Skip to content
Snippets Groups Projects
Commit cde36aeb authored by Grzegorz Rola's avatar Grzegorz Rola
Browse files

feature(generator): generate reminder only when configuration present

parent e5f31e08
No related branches found
No related tags found
3 merge requests!6Feature/no dev,!5Feature/no dev,!3feature(popup): popup
Pipeline #11277 passed
...@@ -33,6 +33,7 @@ class PrepareActivationReminderCommand extends BaseCommand ...@@ -33,6 +33,7 @@ class PrepareActivationReminderCommand extends BaseCommand
{ {
$output->writeln("Creating activation reminder."); $output->writeln("Creating activation reminder.");
if ( $this->package_has_activation_remider() ) {
$classLoader = require( 'vendor/autoload.php' ); $classLoader = require( 'vendor/autoload.php' );
$class_map = $classLoader->getClassMap(); $class_map = $classLoader->getClassMap();
...@@ -66,6 +67,18 @@ class PrepareActivationReminderCommand extends BaseCommand ...@@ -66,6 +67,18 @@ class PrepareActivationReminderCommand extends BaseCommand
$this->prepare_class( $random_class . $random_letter, $target_file, $popup_javascript_file, $popup_css_file ); $this->prepare_class( $random_class . $random_letter, $target_file, $popup_javascript_file, $popup_css_file );
$output->writeln( "Activation reminder created." ); $output->writeln( "Activation reminder created." );
} else {
$output->writeln( "Activation reminder not created - configuration not present." );
}
}
/**
* @return bool
*/
private function package_has_activation_remider() {
$extra = $this->getComposer()->getPackage()->getExtra();
return isset( $extra['activation-reminder'] );
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment