braune-digital / activity-bundle
Activity Bundle
Installs: 8
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 9
Forks: 1
Open Issues: 0
Type:symfony-bundle
This package is auto-updated.
Last update: 2025-01-12 01:18:14 UTC
README
This Bundle allows the creation of activities based on Entity-Audits. It also displays the activity in SonataAdmin.
Requirements
Required:
- SimpleThingsEntityAuditBundle
- DoctrineORM
Optional:
- SonataAdminBundle
Installation
For SimpleThingsEntityAuditBundle < 1.0.6
install the the bundle using composer:
composer require braune-digital/activity-bundle "~1.2"
For SimpleThingsEntityAuditBundle >= 1.0.6
install the the bundle with:
composer require braune-digital/activity-bundle "~1.3"
And enable the Bundle in your AppKernel:
public function registerBundles() { $bundles = array( ... new SimpleThings\EntityAudit\SimpleThingsEntityAuditBundle(), new BrauneDigital\ActivityBundle\BrauneDigitalActivityBundle(), ... );
Configuration
braune_digital_activity: doctrine_subscribing: true #enable the direct creation of activities observed_classes: #array of classes that need to be watched 'AppBundle\Entity\TimedTask': #classname fields: #watched fields created: ~ title: ~ modified: ~ 'Application\Ekas\AppBundle\Entity\Step': ~ # watch creation / deletion only 'AppBundle\Entity\TimedTask': fields: done: ~ title: ~ description: ~
Configure Entities
Resolve UserInterface:
doctrine: orm: resolve_target_entities: BrauneDigital\ActivityBundle\Model\UserInterface: Application\AppBundle\Entity\User
Add Doctrine Relations to your User
oneToMany: activities: targetEntity: 'BrauneDigital\ActivityBundle\Entity\Stream\Activity' mappedBy: user cascade: ["persist", "remove"]
Build a Stream using the consle
php app/console braunedigital:activity:buildstream
TODO
- Add Usage-Section in Readme