radiofrance/cellulr-engine

Engine for CellulR

Installs: 3 204

Dependents: 1

Suggesters: 0

Security: 0

Stars: 5

Watchers: 10

Forks: 0

Open Issues: 1

Type:symfony-bundle

v4.0.2-beta-1 2018-05-23 08:29 UTC

README

CellulR is an engine to build websites. Each page is composed from isolated and independent cells.

This project is production ready, and is used on www.franceculture.fr .

Each cell is isolated and autonomous. A cell is composed of (at least) one PHP Controller, JavaScript and CSS files.

How it works ?

1. Rendering

Render a cell 'VideoPlayer' in current page, with Twig :

{{ cell('VideoPlayer', {arg1: 'a value'}) }}

Or using Varnish ESI (with standalone route):

{{ cell('VideoPlayer', {arg1: 'a value'}, {strategy: 'esi'}) }}

2. The cell

<?php

use Rf\CellulR\EngineBundle\CoreObject\Response;

class VideoPlayer
{
    public function __invoke(Video $video) {
        return new Response([
            'video' => $video
        ]); 
    }
}

3. Manifest file

The component.json declares dependencies (with other cells) :

{
    "name": "VideoPlayer",
    "description": "Cell for video player",
    "require": {
        "Legend": "*",
        "Image": "*"
    }
}

4. Assets (Javascript and Less)

Less files and JavaScript files are automatically included thanks to the cellulR-builder component.

Installation and documentation

[French only] Documentation

Do not hesitate to help us to translate documentation in english :)

Licence

Project licensed under Cecill-B license. Please open the LICENSE file.