endroid/tile-bundle

Endroid Tile Bundle for Symfony

Installs: 2 303

Dependents: 0

Stars: 1

Watchers: 1

Language: PHP

1.1.7 2015-07-04 19:51 UTC

README

By endroid

Build Status Latest Stable Version Total Downloads

This bundle provides a default controller for generating tiles using the Endroid Tile (endroid/Tile) library. No configuration or extension loading is required. You only need to load the routing file.

knpbundles.com

Requirements

  • Symfony
  • Dependencies:

Installation

Use Composer to install the bundle.

$ composer require endroid/tile-bundle

Then enable the bundle via the kernel.

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Endroid\Bundle\TileBundle\EndroidTileBundle(),
    );
}

Routing

Add the following section to your routing to be able to reach the tile controller.

EndroidTileBundle:
    resource:   "@EndroidTileBundle/Controller/"
    type:       annotation
    prefix:     /tile

Twig extension

The bundle also provides a Twig extension for quickly generating tile urls.

<img src="{{ tile_url(message) }}" />

Configuration

No configuration required.

Usage

After installation and configuration, tiles can be generated by appending the tile text to the url as mounted, followed by .png. For the example given above, this would be /tile/Life_is_too_short_to_be_generating_tiles.png

Tile

Versioning

Semantic versioning (semver) is applied as much as possible.

License

This bundle is under the MIT license. For the full copyright and license information, please view the LICENSE file that was distributed with this source code.