Download the PHP package magicsunday/webtrees-module-base without Composer
On this page you can find all versions of the php package magicsunday/webtrees-module-base. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package webtrees-module-base
webtrees-module-base
Shared PHP base classes for the magicsunday family of webtrees chart modules. Centralises the date, name, image and place processing logic, common models (genealogical symbols enum, tree node), and module helpers (GitHub release-version checking with file cache) so each chart module does not have to reimplement them.
This package ships no UI of its own — it is consumed as a Composer dependency by:
- webtrees-fan-chart — SVG ancestor fan chart
- webtrees-pedigree-chart — SVG pedigree chart
- webtrees-descendants-chart — SVG descendants chart
Requirements
- PHP 8.3 - 8.5 with extension
dom - webtrees
~2.2
Installation
This package is pulled in automatically when you install any of the chart modules above. To depend on it directly from your own webtrees module:
If your module uses ImageProcessor (silhouette URL handling), declare the marker interface so the constructor's intersection type is satisfied:
ModuleCustomTrait already provides the required assetUrl() method — only the interface declaration is new.
What's inside
src/Processor/
DateProcessor— generation-aware date formatting (compactgetFormatted*API for tight chart labels; locale-aware legacygetBirth*/getDeath*/getMarriage*API for everything else)NameProcessor— name extraction from webtrees name HTML (DOM/XPath based — splits first/last/preferred, handles starredname, alternative and married names)ImageProcessor— highlight image + silhouette URL resolutionPlaceProcessor— place name shortening (configurable parts) for chart labels
src/Model/
Symbols— backed enum for genealogical symbols (Birth ★, Death †, en-dash separator, MarriageDateUnknown sentinel)NameAbbreviation— backed enum +resolve()helper for the name-abbreviation strategy used in chart labels (auto / given-first / surname-first)
src/Module/
VersionInformation— checks GitHub releases for newer module versions, with file cache (used by the chart modules' admin pages)
src/Contract/
ModuleAssetUrlInterface— marker interface that declares webtrees'assetUrl()helper soImageProcessorcan be type-narrowed withoutmethod_existsruntime checks
Development
See AGENTS.md for the full development workflow including the buildbox vs standalone modes, the make link-base sibling-clone pattern, and the tooling-parity policy with consumer modules.
Quick reference:
License
GPL-3.0-or-later — see LICENSE.