slugService = $slugService; } public function executeUpdate(): bool { $this->slugService->performUpdates(); return true; } public function updateNecessary(): bool { $elementCount = $this->slugService->countOfSlugUpdates(); return $elementCount > 0; } public function getPrerequisites(): array { return [ DatabaseUpdatedPrerequisite::class ]; } /** * Get title * * @return string */ public function getTitle(): string { return 'Updates slug field "path_segment" of EXT:news records'; } /** * Get description * * @return string Longer description of this updater */ public function getDescription(): string { return 'Fills empty slug field "path_segment" of EXT:news records with urlized title.'; } /** * @return string Unique identifier of this updater */ public function getIdentifier(): string { return 'newsSlug'; } }