sqli / publish_scheduler
SQLI Publish Schedule is a bundle to perform a delayed publish and unpublish for content
Installs: 3
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:ezplatform-bundle
Requires
- php: ^7.1
- doctrine/doctrine-bundle: ^1.6
- doctrine/orm: ^2.5
- ezsystems/ezplatform-admin-ui: ^1.0
- ezsystems/ezpublish-kernel: ^7.0
Requires (Dev)
- phpunit/phpunit: 4.4.*
This package is auto-updated.
Last update: 2024-12-22 03:36:11 UTC
README
SQLI Publish Schedule is a bundle to perform a delayed publish and unpublish for content
By default, publish/unpublish works with Location's visibility
(variable sqli_publish_scheduler.publish_scheduler_handler
) and dates must be defined in 2 ContentFields
(eZDate or eZDateTime)
Installation
Install with composer
composer require sqli/publish_scheduler:dev-master
Register the bundle
Activate the bundle in app/AppKernel.php
// app/AppKernel.php public function registerBundles() { $bundles = [ // ... new SQLI\PublishSchedulerBundle\SQLIPublishSchedulerBundle(), ]; }
ContentType
Add 2 new fields (ezdate or ezdatetime) for each ContentType concerned by delayed publication.
Expected identifiers : publish_date
and unpublish_date
, or whatever defined in
sqli_publish_scheduler.ezdatetime_field_publish
and sqli_publish_scheduler.ezdatetime_field_unpublish
Parameters (optional)
This is the defaults parameters
sqli_publish_scheduler: ezdatetime_field_publish: 'publish_date' ezdatetime_field_unpublish: 'unpublish_date' publish_scheduler_handler: '@sqli_publish_scheduler.handler.visibility'
Cron (optional)
Command cronjob used ezplatform-cron and already declared in services.yml
to publish/unpublish contents.
You can override this service in order to change frequency (every minute by default)
services: sqli_publish_scheduler.cron: class: SQLI\PublishSchedulerBundle\Command\PublishUnpublishCommand tags: - { name: console.command } - { name: ezplatform.cron.job, schedule: '* * * * *' }
You can change the frequency of the cronjob with schedule
property according to
CRON expression
Please note that no category is defined, so this cronjob is in category default