Skip to content

Extension points

tilttek/journal-bundle

The package is at 0.x: its extension points are stable only from its 1.0 release. Until then, a minor version may change them, and its CHANGELOG says how.

ToDo
Write and read the journalsInject Tilttek\Journal\Journal.
Export entries in MarkdownInject Tilttek\Journal\Export\MarkdownExport, its links set by markdown.page_link.
Keep the secrets of the campaignsName the store in knowledge_store, or define Tilttek\PlayerKnowledge\Knowledge.
Link names to pagesImplement Tilttek\Journal\Contract\PageDirectoryInterface, and name it in pages_service.
Draft summaries from the sessionImplement Tilttek\Journal\Contract\SessionEventSourceInterface, and name it in session_events_service.
Act on what happenedListen to the events of tilttek/journal (Events).
Keep the entries elsewhereAlias Tilttek\Journal\Contract\JournalStoreInterface to your own store.
Tell the events another wayAlias Tilttek\Journal\Contract\JournalObserverInterface to your own observer.
Say who may write or readCheck it in the application before calling Journal.

Services and aliases

IdServicePublic
Tilttek\Journal\JournalThe journal.yes
Tilttek\Journal\Export\MarkdownExportThe Markdown export.yes
Tilttek\Journal\Contract\JournalStoreInterfaceAlias of DbalJournalStore, or of InMemoryJournalStore with store: memory.yes
Tilttek\Journal\Contract\JournalObserverInterfaceAlias of DispatchingObserver.yes
Tilttek\PlayerKnowledge\KnowledgeOn the store of knowledge_store, when it is set.yes
Tilttek\JournalBundle\Infrastructure\Doctrine\JournalSchemaListenerTagged doctrine.event_listener on postGenerateSchema, with the ORM.no
Tilttek\JournalBundle\Infrastructure\Privacy\JournalPrivacyTagged phil_privacy.exporter and phil_privacy.eraser, with the privacy bundle.no

Who may write or read

Journal reads each entry for one Reader — a person and the KnowledgeSnapshot of what they know — and hides from them what is not for them. Who may draft, write, publish or remove an entry is the application's to check: the author and the game master, as a security voter or a check in the controller decides.