PHPackages                             locomotivemtl/charcoal-contrib-content-builder - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. locomotivemtl/charcoal-contrib-content-builder

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

locomotivemtl/charcoal-contrib-content-builder
==============================================

Utils for content builder style attachments, using group attachment widget.

0.3.1(7y ago)0348MITShellPHP &gt;=5.6.0

Since May 22Pushed 6y ago14 watchersCompare

[ Source](https://github.com/locomotivemtl/charcoal-contrib-content-builder)[ Packagist](https://packagist.org/packages/locomotivemtl/charcoal-contrib-content-builder)[ Docs](https://locomotive.ca)[ RSS](/packages/locomotivemtl-charcoal-contrib-content-builder/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (6)Versions (7)Used By (0)

Charcoal ContentBuilder
=======================

[](#charcoal-contentbuilder)

[![License](https://camo.githubusercontent.com/39332a3216208fc03638b0297876890a4b658be1f73d80e3fbe9921a5e9808c1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6c6f636f6d6f746976656d746c2f63686172636f616c2d636f6e747269622d636f6e74656e742d6275696c6465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/locomotivemtl/charcoal-contrib-content-builder)[![Latest Stable Version](https://camo.githubusercontent.com/05b91cdd9fe707aff5e4b00b1c8514c3cbdaf421877ae50b301c9c3a1af7145d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c6f636f6d6f746976656d746c2f63686172636f616c2d636f6e747269622d636f6e74656e742d6275696c6465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/locomotivemtl/charcoal-contrib-content-builder)[![Code Quality](https://camo.githubusercontent.com/b7900fe6e6fdede8d0455210f0c12193baf45ddd3242fb8f406f100f5b0ab280/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6c6f636f6d6f746976656d746c2f63686172636f616c2d636f6e747269622d636f6e74656e742d6275696c6465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/locomotivemtl/charcoal-contrib-content-builder/)[![Coverage Status](https://camo.githubusercontent.com/08d04b853871f00e0a0a778b4d3b3e4a65aa90815c64294c31242b1a8dec2be2/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f6c6f636f6d6f746976656d746c2f63686172636f616c2d636f6e747269622d636f6e74656e742d6275696c6465722e7376673f7374796c653d666c61742d737175617265)](https://coveralls.io/r/locomotivemtl/charcoal-contrib-content-builder)[![Build Status](https://camo.githubusercontent.com/c95f7b21bd307e5c0c892f78fcdc66759ec58e3f70ff0847ed077bce76f0aa7f/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6c6f636f6d6f746976656d746c2f63686172636f616c2d636f6e747269622d636f6e74656e742d6275696c6465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/locomotivemtl/charcoal-contrib-content-builder)

A [Charcoal](https://packagist.org/packages/locomotivemtl/charcoal-app) service provider content builder.

Table of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
    - [Dependencies](#dependencies)
- [Configuration](#configuration)
- [Usage](#usage)
- [Development](#development)
    - [API Documentation](#api-documentation)
    - [Development Dependencies](#development-dependencies)
    - [Coding Style](#coding-style)
- [Credits](#credits)
- [License](#license)

Installation
------------

[](#installation)

The preferred (and only supported) method is with Composer:

```
$ composer require locomotivemtl/charcoal-contrib-content-builder
```

### Dependencies

[](#dependencies)

- [Charcoal-core](https://github.com/locomotivemtl/charcoal-core) ~0.3
- [Charcoal-cms](https://github.com/locomotivemtl/charcoal-cms) ~0.5
- [Charcoal-attachment](https://github.com/locomotivemtl/charcoal-attachment) ~0.9

#### Required

[](#required)

- [**PHP 5.6+**](https://php.net): *PHP 7* is recommended.

Configuration
-------------

[](#configuration)

Use the `ContentBuilderInterface` on a model or an instance of `TemplateableInterface`. Configure Attachment groups use the usual method. ex :

```
    {
        "attachables": {
            "exemple/attachments/object/text": {
                "label": {
                    "en": "Text",
                    "fr": "Texte"
                }
            }
        },
        "groups": {
            "content": [
                "exemple/attachments/object/text"
            ]
        },
        "widgets": {
            "content": {
                "title": {
                    "en": "Content",
                    "fr": "Contenu"
                },
                "show_title": true,
                "show_header": true,
                "icon": "edit",
                "template": "charcoal/admin/widget/form-group/attachment",
                "group": "content",
                "attachment_heading": "{{ ident }}",
                "show_attachment_heading": false,
                "show_attachment_preview": true,
                "attachment_options": {
                    "show_preview": true,
                    "show_heading": false
                },
                "priority": 100,
                "attachable_objects": "content"
            }
        }
    }
```

Usage
-----

[](#usage)

Attach any interfaces that are based on this structural model :

```
    {
        "attachments": {
            "widgets": {
                "content": {
                    "type": "charcoal/admin/widget/form-group/attachment",
                    "preset": "content"
                }
            }
        }
    }
```

This will dynamically add an attachment group to the model. You can provide the interface to the template controller if the model implements `TemplateableInterface`. This will dynamically add attachments groups on the model depending of the template context. This can be very useful for `section` object, for example, to allow different attachments groups easily based on the template.

Development
-----------

[](#development)

To install the development environment:

```
$ composer install
```

To run the scripts (phplint, phpcs, and phpunit):

```
$ composer test
```

### API Documentation

[](#api-documentation)

- The auto-generated `phpDocumentor` API documentation is available at:

- The auto-generated `apigen` API documentation is available at:
    [https://codedoc.pub/locomotivemtl/charcoal-contrib-content-builder/master/](https://codedoc.pub/locomotivemtl/charcoal-contrib-content-builder/master/index.html)

### Development Dependencies

[](#development-dependencies)

- \[php-coveralls/php-coveralls\]\[phpcov\]
- \[phpunit/phpunit\]\[phpunit\]
- \[squizlabs/php\_codesniffer\]\[phpcs\]

### Coding Style

[](#coding-style)

The charcoal-contrib-content-builder module follows the Charcoal coding-style:

- [*PSR-1*](https://www.php-fig.org/psr/psr-1/)
- [*PSR-2*](https://www.php-fig.org/psr/psr-2/)
- [*PSR-4*](https://www.php-fig.org/psr/psr-4/), autoloading is therefore provided by *Composer*.
- [*phpDocumentor*](http://phpdoc.org/) comments.
- [phpcs.xml.dist](phpcs.xml.dist) and [.editorconfig](.editorconfig) for coding standards.

> Coding style validation / enforcement can be performed with `composer phpcs`. An auto-fixer is also available with `composer phpcbf`.

Credits
-------

[](#credits)

- [Locomotive](https://locomotive.ca/)

License
-------

[](#license)

Charcoal is licensed under the MIT license. See [LICENSE](LICENSE) for details.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~76 days

Total

5

Last Release

2609d ago

PHP version history (2 changes)0.1.0PHP &gt;=7.0.0

0.2.0PHP &gt;=5.6.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/cfb071c0ff7ce9500c528a003a2c53124248debc3e5bf367c17f89f5e6136125?d=identicon)[mducharme](/maintainers/mducharme)

![](https://www.gravatar.com/avatar/0a4f39523b4b2837562ba0848a0327b8d340118d1ba87cb0f5d59b1d5cb6beba?d=identicon)[mcaskill](/maintainers/mcaskill)

![](https://www.gravatar.com/avatar/f3f29e38395113e2400bdd7e51bea982b17f120d4d5a53d4473b53118ee46f8d?d=identicon)[JoelAlphonso](/maintainers/JoelAlphonso)

---

Top Contributors

[![JoelAlphonso](https://avatars.githubusercontent.com/u/10762266?v=4)](https://github.com/JoelAlphonso "JoelAlphonso (15 commits)")

---

Tags

charcoalutilsattachment

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/locomotivemtl-charcoal-contrib-content-builder/health.svg)

```
[![Health](https://phpackages.com/badges/locomotivemtl-charcoal-contrib-content-builder/health.svg)](https://phpackages.com/packages/locomotivemtl-charcoal-contrib-content-builder)
```

###  Alternatives

[danielstjules/stringy

A string manipulation library with multibyte support

2.4k26.0M191](/packages/danielstjules-stringy)[voku/arrayy

Array manipulation library for PHP, called Arrayy!

4875.5M16](/packages/voku-arrayy)[vaimo/composer-patches

Applies a patch from a local or remote file to any package that is part of a given composer project. Patches can be defined both on project and on package level. Optional support for patch versioning, sequencing, custom patch applier configuration and patch command for testing/troubleshooting added patches.

2994.3M16](/packages/vaimo-composer-patches)[voku/stringy

A string manipulation library with multibyte support

1783.8M19](/packages/voku-stringy)[dereuromark/cakephp-tools

A CakePHP plugin containing lots of useful and reusable tools

338920.1k32](/packages/dereuromark-cakephp-tools)[statamic/stringy

A string manipulation library with multibyte support, forked from @statamic

234.5M14](/packages/statamic-stringy)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
