Skip to content
Snippets Groups Projects

Bugfix on save hooks not being executed

Merged Kevin von Spiczak requested to merge bugfix_OnSaveHooksNotBeingExecuted into master
Files
4
@@ -49,7 +49,9 @@ class CheckDomainModelConsistence extends Command {
* Configure the command
*/
public function configure() {
$this->setDescription('Calls the consistence check for all objects of the given domain model name by dispatching a \'afterUpdateObject\' Signal for a signal slot. If you want to use the $checkOnlyLastYearChanges parameter, then check if the parameter $objectTStampField is correct as well.')
$this->setDescription(
'Calls the consistence check for all objects of the given domain model name by dispatching a \'afterUpdateObject\' Signal for a signal slot. If you want to use the $checkOnlyLastYearChanges parameter, then check if the parameter $objectTStampField is correct as well.'
)
->addArgument('domainNamespace', InputArgument::REQUIRED, 'Domain Namespace')
->addArgument('domainModel', InputArgument::REQUIRED, 'Domain Model')
->addArgument('enableProgressBar', InputArgument::OPTIONAL, 'Enable progress bar', FALSE);
@@ -68,18 +70,21 @@ class CheckDomainModelConsistence extends Command {
$domainNamespace = $input->getArgument('domainNamespace');
$enableProgressBar = $input->getArgument('enableProgressBar');
// Get registered consistence services
$service = ConsistenceRegistrationService::findServiceByNamespace($domainNamespace, $domainModel);
$servicesByNamespace = ConsistenceRegistrationService::findServicesByNamespace($domainNamespace, $domainModel);
$consistenceService = GeneralUtility::makeInstance(ConsistenceService::class);
if ($enableProgressBar) {
$this->io->note('Check consistence for "' . $service['domainModel'] . '"');
foreach ($servicesByNamespace as $serviceByNamespace) {
if ($enableProgressBar) {
$this->io->note('Check consistence for "' . $serviceByNamespace['domainModel'] . '"');
}
$consistenceService->repairConsistence(
0,
ConsistenceService::extractModelNamespace($serviceByNamespace),
ConsistenceService::UPDATE_OBJECT
);
}
$consistenceService->repairConsistence(
0,
ConsistenceService::extractModelNamespace($service),
ConsistenceService::UPDATE_OBJECT
);
if ($enableProgressBar) {
$this->io->note('Finished');
}
Loading