Elao/ElaoParameterizerBundle

Name: ElaoParameterizerBundle

Owner: Elao

Description: null

Created: 2014-07-02 14:53:41.0

Updated: 2016-11-07 21:41:59.0

Pushed: 2014-08-25 13:38:47.0

Homepage: null

Size: 156

Language: PHP

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

ElaoParameterizerBundle

Latest Stable Version Total Downloads Latest Unstable Version License

Scrutinizer Code Quality

Description:

This bundle integrates ElaoParameterizer in your project, which is a clean and easy way to graphically handle php parameters using dat.GUI

Installation:

Add ElaoParameterizerBundle in your composer.json (you would better use it as a development requirement):


"require-dev": {
    "elao/elao/parameterizer-bundle": "1.0.*"
}

Now tell composer to download the bundle by running the command:

p composer.phar update elao/parameterizer
How to use it:

Have a look on ElaoParameterizer to understand Patterns/Parameters concepts and usages.

You can declare patterns :

Programatically
et service
ameterizer = $this->get('elao_parameterizer');

ameterizer
->create('foo')
    ->create('bar', 'value')
    ->create('baz', 456, array(
        'label'   => 'Baz',
        'choices' => array(123, 456, 789)
    ));
In config.yml
_parameterizer:
patterns:
    foo:
        parameters:
            bar: value
            baz:
                value: 456
                options:
                    label:   Baz
                    choices: [123, 456, 789]
In services
vice id="foo.parameters"
 class="%elao_parameterizer.pattern.class%"
 factory-service="elao_parameterizer.factory"
 factory-method="createPattern"

<tag name="elao_parameterizer.pattern" />
<argument>foo</argument>
<call method="create">
    <argument>bar</argument>
    <argument>value</argument>
</call>
<call method="create">
    <argument>baz</argument>
    <argument>456</argument>
    <argument type="collection">
        <argument key="label">Baz</argument>
        <argument key="choices" type="collection">
            <argument>123</argument>
            <argument>456</argument>
            <argument>789</argument>
        </argument>
    </argument>
</call>
rvice>

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.