2017 © Pedro Pelรกez
 

library ecl-twig-loader

Europa Component Library Twig loader.

image

openeuropa/ecl-twig-loader

Europa Component Library Twig loader.

  • Monday, July 23, 2018
  • by ademarco
  • Repository
  • 16 Watchers
  • 1 Stars
  • 1,730 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 66 % Grown

The README.md

Europa Component Library Twig loader

Build Status Packagist, (*1)

Twig loader for Europa Component Library Twig implementation (ECL Twig), it allows to load components by accessing them via a configurable namespace., (*2)

For example, given you have the following ECL twig components:, (*3)

/path/to/components/
โ”œโ”€โ”€ ec-component-link
โ”‚ย ย  โ””โ”€โ”€ ecl-link.html.twig
โ””โ”€โ”€ ec-component-language-list
 ย ย  โ”œโ”€โ”€ ecl-language-list.html.twig
 ย ย  โ”œโ”€โ”€ ecl-language-list-item.html.twig
 ย ย  โ”œโ”€โ”€ ecl-language-list-overlay.html.twig
 ย ย  โ””โ”€โ”€ ecl-language-list-splash.html.twig

If you setup the loader as follows:, (*4)

<?php

use \OpenEuropa\Twig\Loader\EuropaComponentLibraryLoader;

$loader = new EuropaComponentLibraryLoader(['ecl-twig'], '/components', '/path/to');
$twig = new Twig_Environment($loader);

Then you can load the link component in the following way:, (*5)

{% include '@ecl-twig/ec-component-link/ecl-link.html.twig' with {
  link: { 
    type: 'standalone',
    label: 'Standalone link',
    path: 'http://google.com',
    icon_position: 'after'
  }
} %}

You can also use a shorter form, based on implicit naming conventions:, (*6)

{% include '@ecl-twig/link' with {
  link: {
    type: 'standalone',
    label: 'Standalone link',
    path: 'http://google.com',
    icon_position: 'after'
  }
} %}

To load sub-components append them after the component name:, (*7)

{% include '@ecl-twig/language-list/language-list-splash' %}

Installation using Docker Compose

The setup procedure can be simplified by using Docker Compose., (*8)

Requirements:, (*9)

Copy docker-compose.yml.dist into docker-compose.yml., (*10)

You can make any alterations you need for your local Docker setup. However, the defaults should be enough to set the project up., (*11)

Run:, (*12)

$ docker-compose up -d

Then:, (*13)

$ docker-compose exec web composer install

The Versions

23/07 2018

dev-master

9999999-dev

Europa Component Library Twig loader.

  Sources   Download

EUPL-1.1 EUPL-1.2

The Requires

 

The Development Requires

23/07 2018

dev-OPENEUROPA-710

dev-OPENEUROPA-710

Europa Component Library Twig loader.

  Sources   Download

EUPL-1.2

The Requires

 

The Development Requires

19/07 2018

0.1.1

0.1.1.0

Europa Component Library Twig loader.

  Sources   Download

EUPL-1.2

The Requires

 

The Development Requires

29/06 2018

dev-OPENEUROPA-369

dev-OPENEUROPA-369

Europa Component Library Twig loader.

  Sources   Download

EUPL-1.2

The Requires

 

The Development Requires

20/02 2018

0.1.0

0.1.0.0

Europa Component Library Twig loader.

  Sources   Download

EUPL-1.1

The Requires

 

The Development Requires

19/05 2017

0.0.1

0.0.1.0

Europa Component Library Twig loader.

  Sources   Download

EUPL-1.1

The Requires

 

The Development Requires