Download the PHP package locomotivemtl/charcoal-ui without Composer

On this page you can find all versions of the php package locomotivemtl/charcoal-ui. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package charcoal-ui

Charcoal UI

The Charcoal\Ui module provides tools to create UI elements (dashboards, layouts, forms and menus) from simple metadata / config.

Table of contents

How to install

The preferred (and only supported) way of installing charcoal-ui is with composer:

Dependencies

Example Usage

Form

Base UI Item

All UI classes implements the same basic class: \Charcoal\Ui\UiItemInterface. This interface defines a basic set of properties that are shared across (almost) all ui item types.

Base UI Item config

Key Type Default Description
type string
title string[1]
subtitle string[1]
description string[1]
notes string[1]
template_ident string '' The default view template.

[1] indicates a l10n string (TranslationString)

View Integration

The UiItemInterface is a Viewable item; that means it also implements the \Charcoal\View\ViewableInterface. The AbstractUiItem fully implements this interface by using \Charcoal\View\ViewableTrait.

Viewable objects can set a View object with setView($view) have a template_ident (which can be set with setTemplateIdent($id)). See the charcoal-view module for details.

The easiest way to use a View is by setting a ViewInterface object as view service on a DI container / Service Provider.

Dashboard

Dashboards define a layout of widgets.

Dashboard config

Key Type Default Description
type string
layout LayoutConfig
widgets array

Dashboard dependencies

Dashboard API

Layout

Layouts define a grid (column-based) structure.

Layout config

Key Type Default Description
structure array
structure.columns array

Example layout JSON config

Layout API

Layout Aware objects

In the charcoal-ui module, 3 base objects use a layout: dashboards, forms and form groups.

Those classes implement the Layout requirement by implementing the \Charcoal\Ui\Layout\LayoutAwareInterface with the use of its corresponding LayoutAwareTrait.

Form

Forms define a layout of form groups, form options, data and metadata.

Form config

Key Type Default Description
type string
action string '' URL where the form will be submitted.
method string 'post' HTTP method to submit ("post" or "get").
layout LayoutConfig
groups FormGroupConfig[]
form_data array
metadata array

Form dependencies

Form API

Form Group

Form group config

Key Type Default Description
form
template_ident string
template_controller string
priority int
layout LayoutConfig
properties array

Form group API

Form Input

Menu

Menu Item

Menu items define a menu level (ident, label and url) and its children (array of Menu Item).

Menu item config

Menu item API

Creational Helpers

Most UI elements are very dynamic. The types of object to create is often read from a string in a configuration object. Therefore, factories are the preferred way of instanciating new UI items.

Ui items have also many inter-connected dependencies. Builders should therefore be used for object creation / instanciation. They use a factory internally, and have a build($opts) methods that allow to retrieve class name from a dynamic source, do initialization, dpendencies management and more. Builders require Pimple for a DI container.

Factories

Builders

Service Providers

Service providers are provided in the Charcoal\Ui\ServiceProvider namespace for for convenience. They are the recommended way of using charcoal-ui, as they register all the creational utilities to a container, taking care of dependencies.

Required services

There are a few dependencies on external services, that should be set on the same DI container as the one passed to the service providers:

Development

To install the development environment:

API documentation

Development dependencies

Continuous Integration

Service Badge Description
Travis Build Status Runs code sniff check and unit tests. Auto-generates API documentation.
Scrutinizer Scrutinizer Code Quality Code quality checker. Also validates API documentation quality.
Coveralls Coverage Status Unit Tests code coverage.
Sensiolabs SensioLabsInsight Another code quality checker, focused on PHP.

Coding Style

The Charcoal-Ui module follows the Charcoal coding-style:

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

Authors

License

Charcoal is licensed under the MIT license. See LICENSE for details.


All versions of charcoal-ui with dependencies

PHP Build Version
Package Version
Requires php Version >7.1
psr/log Version ^1.0
locomotivemtl/charcoal-config Version ~0.10
locomotivemtl/charcoal-factory Version ~0.4
locomotivemtl/charcoal-translator Version ~0.3
locomotivemtl/charcoal-view Version ~0.4
locomotivemtl/charcoal-user Version ~0.6
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package locomotivemtl/charcoal-ui contains the following files

Loading the files please wait ....