Download the PHP package innobraingmbh/onoffice-structure without Composer
On this page you can find all versions of the php package innobraingmbh/onoffice-structure. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download innobraingmbh/onoffice-structure
More information about innobraingmbh/onoffice-structure
Files in innobraingmbh/onoffice-structure
Package onoffice-structure
Short Description Package to extract the enterprise configuration
License MIT
Homepage https://github.com/innobraingmbh/onoffice-structure
Informations about the package onoffice-structure
onOffice Structure Extractor for Laravel
Extract and work with the onOffice enterprise field configuration (Modul- und Feldkonfiguration) in Laravel. The package fetches configurations via innobrain/laravel-onoffice-adapter, transforms them into readonly DTOs, and converts them into various output formats using a strategy pattern.
Features
- Fetch field configurations for all onOffice modules (Address, Estate, AgentsLog, Calendar, Email, File, News, Intranet, Project, Task, User)
- Readonly DTOs for Modules, Fields, Permitted Values, Dependencies, and Filters
- Convert to arrays, Laravel validation rules, Prism PHP schemas, or JSON Schema
- Filter fields by configuration-based conditions with a fluent builder
- Sanitize input data against field definitions and permitted values
- Multi-language support (German, English, French, Spanish, Italian, Croatian)
- Extensible converter strategy pattern for custom output formats
Installation
You can optionally publish the configuration file:
Usage
Fetching Structure Data
Use the Structure facade or inject Innobrain\Structure\Services\Structure:
Filtering Fields
Fields can have filter configurations that determine their visibility based on other field values. Use the fluent FieldFilterBuilder to narrow down fields:
Sanitizing Input Data
Remove keys that don't match known fields or have invalid permitted values:
Converting Data
All DTOs and collections implement Convertible and can be transformed using a ConvertStrategy.
Array Conversion
Laravel Validation Rules
Prism Schema (for AI tooling)
Field type mapping: VarChar/Text/Blob -> StringSchema, Integer/Float -> NumberSchema, Boolean -> BooleanSchema, Date/DateTime -> StringSchema (with format hint), SingleSelect -> EnumSchema, MultiSelect -> ArraySchema<EnumSchema>.
JSON Schema
Writing a Custom Converter
Implement ConvertStrategy (or extend BaseConvertStrategy) and add convertField, convertModule, etc. methods matching the DTO class names:
DTOs
All DTOs are readonly and implement Convertible.
| DTO | Key Properties |
|---|---|
Module |
key (FieldConfigurationModule), label, fields (FieldCollection) |
Field |
key, label, type (FieldType), length, permittedValues, default, filters, dependencies, compoundFields, fieldMeasureFormat |
PermittedValue |
key, label |
FieldDependency |
dependentFieldKey, dependentFieldValue |
FieldFilter |
name, config |
Testing
Changelog
Please see CHANGELOG.md for more information on what has changed recently.
Contributing
Contributions are welcome! Please open an issue or pull request. For bug reports, use the Bug Report Template.
Security Vulnerabilities
If you discover a security vulnerability, please send an e-mail to Konstantin Auffinger via the email address in composer.json. All security vulnerabilities will be promptly addressed.
Credits
- Konstantin Auffinger
- All Contributors
Built with Spatie's Laravel Package Tools.
License
The MIT License (MIT). Please see composer.json for more information.
All versions of onoffice-structure with dependencies
illuminate/contracts Version ^12.53|^13.0
innobrain/laravel-onoffice-adapter Version ^1.10
prism-php/prism Version >=v0.89.0 < v1.0
spatie/laravel-package-tools Version ^1.16