/teavee-html-generator-bundle

A framework for creating HTML components-buttons, icons, etc-with support for API-based calls or twig extensions.

Primary LanguagePHPMIT LicenseMIT

[scr-be] teavee-html-generator-bundle

Continuous Integration Code Quality Review UnitTest Coverage
Travis Codacy Coveralls

Overview

Welcome! The scr-be/teavee-html-generator-bundle package provides a framework for creating HTML component generators by implementing:

  • An abstract "provider" for defining data retrieval logic
  • An abstract "generator" for defining rendering logic
  • An abstract "manager" for interfacing between the above components, handling the optional caching operations, and providing a simple user-facing API
  • Twig extension registrar abstraction

Grouping

This package is part of the teavee group (explanation), comprised of other releases with a concentration in media, HTML, content, generator, and related functionality.

JTT

This package represents a single project within a large collection of open-source code released under the Scribe namespace, comprised of framework-agnostic libraries, and a number of Symfony bundles. These projects are authored and maintained by Rob Frawley 2nd and collaborators, often with the support of Scribe Inc.

Quick Start

Installation

Get the code by requiring it explicitly via the Composer CLI, or by editing your composer.json to reflect the dependency and updating your project requirements. For example, to explicitly require this project using the CLI, use the following command.

$ composer require scr-be/teavee-html-generator-bundle

To enable the bundle, register it with your Symfony application kernel by instantiating ScribeTeaveeHtmlGeneratorBundle within the bundle array.

// app/AppKernel.php
class AppKernel extends Kernel {
    public function registerBundles() {
        $bundles = [
            // ...
            new Scribe\Teavee\HtmlGeneratorBundle\ScribeTeaveeHtmlGeneratorBundle(),
        ];
        // ...
    }
}

Configuration

Available configuration values can be referenced by using the Symfony console command app/console (assuming the Symfony full-stack framework and bundle registration). Additionally, this bundle provides a bare console executable that can be invoked by calling the following.

bin/teavee-html-generator config:dump-reference scribe_teavee_html_generator

Reference

API Docs

This package's API-documentation is available at scr.be/teavee-html-generator-bundle/api, (as well as linked below via the Reference badge found under the Additional Links header). All API-reference is build against the master Git branch and updated automatically on each Git push---api-reference for specific releases will be provided once this package has matured.

The entire API-reference website is auto-generated using a quick, reliable, and well-developed CLI tool called Sami. It is rigerously and regularly tested through its use in large, complex projects, such as the Symfony Full-Stack Framework <see: scr.be/go/api-ref-symfony>, as well as its use in smaller projects such Twig <see: scr.be/go/api-ref-twig>. Reference Sami's GitHub page to learn how to use it with your own projects!

Examples/Tutorials

Currently, there is no "human-written" documentation---outside of this README. Pending package stability and available resources, a RTD (Read the Docs) page will be published with additional information and tutorials, including real use-cases within the Symfony Framework.

Contributing

Discussion

For general inquiries or to discuss a broad topic or idea, you can find robfrawley on Freenode. There is also a #scribe channel, which can be joined using the following link irc.choopa.net:6669/scribe.

Issues

To report issues or request a new feature use GitHub or GitLab to start a discussion. Include as much information as possible to aid in a quick resolution. Feel free to "ping" the topic if you don't get a response within a few days.

Code

You created additional functionality during the use of this package? Send it back upstream! Don't hesitate to submit a pull request! Beyond the brief requirements outlined in the contibuting guide, your imagination represents the only limitation.

License

This project is licensed under the MIT License, an FSF-/OSI-approved and GPL-compatible, permissive free software license. Review the LICENSE file distributed with this source code for additional information.

Additional Links

Purpose Status
Stable Release Packagist
Dev Release Packagist
License License
Reference License