manuxi / sulu-event-bundle
Say hello to Sulu events!
Installs: 101
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 2
Forks: 4
Open Issues: 0
Type:symfony-bundle
Requires
- php: ^8.1
- doctrine/doctrine-bundle: ^2.13
- phpcr/phpcr-migrations-bundle: ^1.6
- sulu/automation-bundle: ^2.1
- sulu/sulu: ^2.5
- symfony/config: ^6.2 | ^7.0
- symfony/dependency-injection: ^6.2 | ^7.0
- symfony/framework-bundle: ^6.2 | ^7.0
- symfony/http-foundation: ^6.2 | ^7.0
- symfony/http-kernel: ^6.2 | ^7.0
- symfony/intl: ^6.2 | ^7.0
- symfony/security-core: ^6.2 | ^7.0
- symfony/translation: ^6.2 | ^7.0
- twig/extra-bundle: ^3.12
- twig/intl-extra: ^3.12
Requires (Dev)
- jackalope/jackalope-doctrine-dbal: ^1.3.4
- phpspec/prophecy: ^1.17
- phpunit/phpunit: ^8.0
- symfony/browser-kit: ^4.4 | ^5.0 | ^6.2 | ^7.0
- symfony/console: ^4.4 | ^5.0 | ^6.2 | ^7.0
- symfony/phpunit-bridge: ^4.4 | ^5.0 | ^6.2 | ^7.0
- dev-main
- 1.6.1
- 1.6.0
- 1.5.7
- 1.5.6
- 1.5.5
- 1.5.4
- 1.5.3
- 1.5.2
- 1.5.1
- 1.5.0
- 1.4.0
- 1.3.7
- 1.3.6
- 1.3.5
- 1.3.4
- 1.3.3
- 1.3.2
- 1.3.1
- 1.3.0
- 1.2.10
- 1.2.9
- 1.2.8
- 1.2.7
- 1.2.6
- 1.2.5
- 1.2.4
- 1.2.3
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.5
- 1.1.4
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.16
- 1.0.15
- 1.0.14
- 1.0.13
- 1.0.12
- 1.0.11
- v1.0.10
- v1.0.9
- v1.0.8
- v1.0.7
- v1.0.6
- v1.0.5
- v1.0.4
- v1.0.2
- v1.0.1
- v1.0.0
- dev-master
This package is auto-updated.
Last update: 2024-12-21 00:01:22 UTC
README
This bundle was made based on Sulu workshop. I made it to have the possibility to manage events in my projects.
This bundle contains
- Several filters for Event Content Type
- Link Provider
- Sitemap Provider
- Handler for Trash Items
- Handler for Automation
- Possibility to assign a contact as author
- Twig Extension for resolving events / get a list of events
- Events for displaying Activities and more...
The news and their meta information is translatable.
It contains an example twig template.
The events and their meta information is translatable.
Please feel comfortable submitting feature requests. This bundle is still in development. Use at own risk ๐ค๐ป
๐ฉ๐ปโ๐ญ Installation
Install the package with:
composer require manuxi/sulu-event-bundle
If you're not using Symfony Flex, you'll also
need to add the bundle in your config/bundles.php
file:
return [ //... Manuxi\SuluEventBundle\SuluEventBundle::class => ['all' => true], ];
Please add the following to your routes_admin.yaml
:
SuluEventBundle: resource: '@SuluEventBundle/Resources/config/routes_admin.yml'
Last but not least the schema of the database needs to be updated.
Some tables will be created (prefixed with app_):
location, event, event_translation, event_seo, event_excerpt
(plus some ManyToMany relation tables).
See the needed queries with php bin/console doctrine:schema:update --dump-sql
.
Update the schema by executing php bin/console doctrine:schema:update --force
.
Make sure you only process the bundles schema updates!
๐ฃ Usage
First: Grant permissions for events. After page reload you should see the event item in the navigation. Start to create locations, then events. Use smart_content property type to show a list of events, e.g.:
<property name="events" type="smart_content"> <meta> <title lang="en">Events</title> <title lang="de">Veranstaltungen</title> </meta> <params> <param name="provider" value="events"/> <param name="max_per_page" value="5"/> <param name="page_parameter" value="page"/> </params> </property>
Example of the corresponding twig template for the event list:
{% for event in events %} <div class="col"> <h2> {{ event.title }} </h2> <p> {{ event.startDate|format_datetime('full', 'none', locale=app.request.getLocale()) }} {% if endDate and startDate != endDate %} - {{ event.endDate|format_datetime('full', 'none', locale=app.request.getLocale()) }} {% endif %} </p> <p> {{ event.summary|raw }} </p> <p> {{ event.text|raw }} </p> <p> {{ event.footer|raw }} </p> <p> <a class="btn btn-primary" href="{{ event.routePath }}" role="button"> {{ "Read more..."|trans }} <i class="fa fa-angle-double-right"></i> </a> </p> </div> {% endfor %}
Since the seo and excerpt tabs are available in the event editor, meta information can be provided like it's done as usual when rendering your pages.
๐งถ Configuration
There exists no configuration yet. I'm on it :)
๐ฉโ๐ณ Contributing
For the sake of simplicity this extension was kept small. Please feel comfortable submitting issues or pull requests. As always I'd be glad to get your feedback to improve the extension :).