Download the PHP package clesson-de/silverstripe-contacts without Composer
On this page you can find all versions of the php package clesson-de/silverstripe-contacts. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download clesson-de/silverstripe-contacts
More information about clesson-de/silverstripe-contacts
Files in clesson-de/silverstripe-contacts
Package silverstripe-contacts
Short Description All contacts and addresses at one place.
License BSD-3-Clause
Informations about the package silverstripe-contacts
Silverstripe Contacts Module
A central, flexible contact management system for Silverstripe 6. Manage companies, persons, and employees in a unified type hierarchy — complete with addresses, tags, customer numbers, payment accounts, avatars, and vCard export.
Features
- Contact type hierarchy — abstract base class
Contactwith concrete subclassesCompany,Person, andEmployee - Company — stores company name and optional suffix
- Person — stores gender, title, first/last name, nickname, birthday, marital status, and more
- Employee — links a
Personto aCompany, representing a working relationship - One address per contact — each contact type has a single
has_one Addressrelation; the semantic address type (home, business, work) is implied by the contact type - Tag system — assign contacts to one or more groups via
ContactTag - Payment accounts — link bank accounts, credit cards, and online accounts via
ContactPaymentAccountsExtension(requiresclesson-de/silverstripe-payment-accounts) - Customer numbers — auto-generated from a configurable template with date parts and random segments; only assigned to contacts in the CUSTOMER tag group
- Avatar upload — image upload with initials fallback
- vCard download — export any contact as a
.vcffile (requiresDOWNLOAD_CONTACTSpermission) - CMS member linking — optionally link a contact to a Silverstripe
Memberaccount - Website owner — designate one contact as the site owner, accessible globally in templates
- Permissions — fine-grained CMS permissions (
USE_CONTACTS,DOWNLOAD_CONTACTS) - Extensible CMS layout — sidebar + main tabs layout with extension hooks
- Delete protection —
CompanyandPersonrecords linked to anEmployeecannot be deleted
Requirements
| Dependency | Version |
|---|---|
| PHP | ^8.1 |
| silverstripe/framework | ^6 |
| clesson-de/silverstripe-geocoding | ^1 |
| clesson-de/silverstripe-payment-accounts | ^1 |
| jeroendesloovere/vcard | ^1.7 |
| giggsey/libphonenumber-for-php | ^8.13 |
| lekoala/silverstripe-cms-actions | ^2 |
| symbiote/silverstripe-gridfieldextensions | ^5 |
| clesson-de/silverstripe-gridfield-pro | ^1 |
Installation
Then run /dev/build?flush=all.
Data Model
Contact hierarchy
Contact is not declared with PHP's abstract keyword because Silverstripe's ORM requires concrete instantiation for has_one stubs. An Injector mapping in _config/config.yml maps Contact → Person as a fallback.
The CMS uses GridFieldAddNewMultiClass to offer Company, Person, and Employee as creation options.
Shared fields (on Contact)
| Field | Type | Description |
|---|---|---|
Name |
Varchar(255) |
Computed display name |
SortingName |
Varchar(255) |
Computed sorting key |
Slug |
Varchar(100) |
URL-safe unique slug |
Initials |
Varchar(10) |
Computed initials |
Note |
Text |
Free-text note |
CustomerNumber |
Varchar(50) |
Auto-generated customer number |
CustomerSince |
Date |
Date when customer number was assigned |
Relations (on Contact)
| Relation | Type | Target |
|---|---|---|
Account |
has_one |
Member |
Avatar |
has_one |
Image |
Address |
has_one |
Address |
Tags |
many_many |
ContactTag |
Extensions registered by this module
| Extension | Applied to | Adds |
|---|---|---|
ContactPaymentAccountsExtension |
Contact |
has_many PaymentAccounts |
PaymentAccountContactExtension |
PaymentAccount |
has_one Contact |
ContactableMember |
Member |
Reverse link to Contact |
SiteConfigOwner |
SiteConfig |
has_one SiteOwner → Contact |
Configuration
Website owner
The module adds a dropdown to your SiteConfig for selecting a contact as the website owner. The selected contact is available as a global template variable:
Or via PHP:
Customer number template
The customer number template is configured in Settings → Contacts. The default is K-{Y}-{N:3}.
Available placeholders:
| Placeholder | Description | Example |
|---|---|---|
{Y} |
Year (4-digit) | 2026 |
{y} |
Year (2-digit) | 26 |
{m} |
Month | 04 |
{d} |
Day | 23 |
{H} |
Hour | 14 |
{i} |
Minute | 07 |
{s} |
Second | 52 |
{N:3} |
Random digits (length 3) | 047 |
{A:2} |
Random uppercase letters (length 2) | KX |
{X:4} |
Random uppercase letters + digits (length 4) | A3K9 |
Customer numbers are only auto-generated for contacts that belong to the CUSTOMER tag group and do not yet have a customer number.
Contact tags
Define tags that are created automatically on /dev/build:
Address types
Address types are managed by the clesson-de/silverstripe-geocoding module. Configure default types in your project's _config/config.yml:
Developer Documentation
Query helpers
Working with contact types
vCard download
The module exposes a public route for vCard downloads:
Requires the DOWNLOAD_CONTACTS permission. The Contact model provides a getvCardLink() method and a CMS action button.
CMS structure
The Contacts CMS section is a SingleRecordAdmin backed by the ContactConfig singleton. It renders three top-level tabs:
| Tab | Content |
|---|---|
| Contacts | Full list of all Contact records (Company, Person, Employee) |
| Addresses | Full list of all Address records |
| Administration | Inner tabs for ContactTag and AddressType records |
CMS extension hooks
The contact detail form can be extended via Silverstripe extension hooks:
| Hook | Description |
|---|---|
updateMainTabSet(TabSet $tabSet) |
Add or modify main tabs |
updateMarginalCMSFields(FieldList $fields) |
Add fields to the sidebar |
updateFixedMarginalCMSFields(FieldList $fields) |
Add fields to the fixed sidebar area |
updateSlug(string &$slug) |
Modify the auto-generated slug before it is saved |
Permissions
| Permission | Description |
|---|---|
USE_CONTACTS |
View, create, edit, and delete contacts |
DOWNLOAD_CONTACTS |
Download contacts as vCard files |
Frontend Assets
The module ships with compiled admin CSS and JavaScript in client/admin/dist/.
If you want to modify the styles, you need to recompile them.
The source files are in client/admin/src/.
Prerequisites
The required Node.js version is specified in .nvmrc (currently Node 22).
If you use nvm, switch to the correct version with:
Install dependencies
Build
| Script | Input | Output |
|---|---|---|
build:js |
client/admin/src/index.js |
client/admin/dist/bundle.js |
build:css |
client/admin/src/scss/ss-contacts.scss |
client/admin/dist/bundle.css |
Watch mode (during development)
Note: The output filenames
bundle.jsandbundle.cssare static and must not be renamed — they are referenced by name in PHP.
All versions of silverstripe-contacts with dependencies
clesson-de/silverstripe-geocoding Version ^1
clesson-de/silverstripe-payment-accounts Version ^1
jeroendesloovere/vcard Version ^1.7
giggsey/libphonenumber-for-php Version ^8.13
lekoala/silverstripe-cms-actions Version ^2
symbiote/silverstripe-gridfieldextensions Version ^5
clesson-de/silverstripe-gridfield-pro Version ^2
clesson-de/silverstripe-autocomplete Version ^1