namespace App\EventListener;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Tourze\ScheduleEntityCleanBundle\Event\ScheduleEntityCleanFinishEvent;
class EntityCleanSubscriber implements EventSubscriberInterface
{
public static function getSubscribedEvents(): array
{
return [
ScheduleEntityCleanFinishEvent::class => 'onEntityCleaned',
];
}
public function onEntityCleaned(ScheduleEntityCleanFinishEvent $event): void
{
$modelClass = $event->getModelClass();
// Do something with the model class
}
}
bash
php bin/console schedule-entity-clean:run
bash
LOG_RETENTION_DAYS=60
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.