2017 © Pedro Peláez
 

library charcoal-contrib-content-builder

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

image

locomotivemtl/charcoal-contrib-content-builder

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

  • Tuesday, June 5, 2018
  • by mducharme
  • Repository
  • 10 Watchers
  • 0 Stars
  • 6 Installations
  • Shell
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 100 % Grown

The README.md

Charcoal ContentBuilder

![License][badge-license] Latest Stable Version ![Code Quality][badge-scrutinizer] Coverage Status ![Build Status][badge-travis], (*1)

A Charcoal service provider content builder., (*2)

Table of Contents

Installation

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

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

Dependencies

Required

Configuration

Use the ContentBuilderInterface on a model or an instance of TemplateableInterface. Configure Attachment groups use the usual method. ex :, (*4)

    {
        "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

Attach any interfaces that are based on this structural model :, (*5)

    {
        "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., (*6)

Development

To install the development environment:, (*7)

$ composer install

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

$ composer test

API Documentation

Development Dependencies

  • [php-coveralls/php-coveralls][phpcov]
  • [phpunit/phpunit][phpunit]
  • [squizlabs/php_codesniffer][phpcs]

Coding Style

The charcoal-contrib-content-builder module follows the Charcoal coding-style:, (*9)

Coding style validation / enforcement can be performed with composer phpcs. An auto-fixer is also available with composer phpcbf., (*10)

Credits

License

Charcoal is licensed under the MIT license. See LICENSE for details., (*11)

The Versions

05/06 2018

dev-master

9999999-dev https://locomotive.ca

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

  Sources   Download

MIT

The Requires

 

The Development Requires

by Joel Alphonso

utils attachment charcoal

22/05 2018

0.1.0.1

0.1.0.1 https://locomotive.ca

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

  Sources   Download

MIT

The Requires

 

The Development Requires

by Joel Alphonso

utils attachment charcoal

22/05 2018

0.1.0

0.1.0.0 https://locomotive.ca

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

  Sources   Download

MIT

The Requires

 

The Development Requires

by Joel Alphonso

utils attachment charcoal