erdnaxelaweb/staticfakedesign

Provides utilities to generate fake data in order to create a static design

dev-main 2024-02-28 13:02 UTC

This package is auto-updated.

Last update: 2024-04-30 09:42:17 UTC


README

Features

Add the following syntax in your twig template to generate variable with a fake value

{# @fake variable_name value_type }

The variable is generated only when a variable with the same name doesn't exist The available value types are (some type accept parameters) :

  • audio
  • block
  • breadcrumb
  • content
  • coordinates
  • form
  • image
  • link
  • pager
  • richtext
  • search_form
  • taxonomy_entry
  • video

full documentation (coming soon)

Installation

Require the package with composer require erdnaxelaweb/staticfakedesign:dev-main then activate the bundle :

ErdnaxelaWeb\StaticFakeDesignBundle\StaticFakeDesignBundle::class => ['all' => true],

Routing

Add the following root to access the examples `/static/examples:

static:
    path: /static/{path}
    controller: ErdnaxelaWeb\StaticFakeDesignBundle\Controller\StaticController::viewAction
    requirements:
        path: .*

Create your own value generator

coming soon