Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grid configuration #44

Closed
ghost opened this issue Oct 17, 2011 · 17 comments
Closed

grid configuration #44

ghost opened this issue Oct 17, 2011 · 17 comments
Labels
Milestone

Comments

@ghost
Copy link

ghost commented Oct 17, 2011

we could create grid configuration in base config like

datagrid:
    template: YourBaseTemplate

or

datagrid:
    grids:
        mygrid:
            id: 'foo'
            limits: {20: '20', 100:'100', 0:'all'}
            source: {type: 'entity', name:'Blog::Pages'}

and in controller you can call just this->get('grid.mygrid') and you will get grid with all settings

@worenga
Copy link

worenga commented Jan 20, 2012

to be honest, in a real world example i'd probaly use customized child classes instead of config files for this.

@ghost
Copy link
Author

ghost commented Jan 21, 2012

just 1st part(template base config) is going to be implemented

@Abhoryo
Copy link
Member

Abhoryo commented Feb 6, 2012

How to use the same entity but not the same configuration ? (front-end vs back-end)

I like the 2nd part

datagrid:
# default grid configuration
    limits: {1: '1', 5:'5', 10:'10'}

    grids:
        mygrid:
            entity: myproject\mybundle\entity\myentity
            id: 'foo'
            limits: {20: '20', 100:'100', 0:'all'}
            source: {type: 'entity', name:'Blog::Pages'}
            columns:
                first_column:
                    visible: true
                    source: true
                    ...
                second_column:
                    visible: true
                    source: true
                    ...

And call the grid
$this->get('grid')->getGrid('mygrid');


Or add a property to the annotation

/**
 * @GRID\Column(visible=false, group='group1')
 * @GRID\Column(visible=true, group='group2')
 */

And call the grid
$this->get('grid')->setSource('myproject\mybundle\entity\myentity', 'group1');

@Abhoryo Abhoryo closed this as completed Apr 23, 2012
@Abhoryo Abhoryo reopened this Apr 23, 2012
@Abhoryo Abhoryo mentioned this issue May 4, 2012
@sterrien
Copy link
Collaborator

I've done something really interesting, before leaving my office...
I've these two lines in my config.yml, and it works ;-)

apy_data_grid
    limits: {20: '20', 100:'100', 500:'500'}

@Abhoryo
Copy link
Member

Abhoryo commented Jun 28, 2012

It works with the current master ?

@sterrien
Copy link
Collaborator

Of course not ;-)
I have to commit some files tomorow morning !

@Abhoryo
Copy link
Member

Abhoryo commented Jun 28, 2012

To handle a yaml configuration isn't really difficult. It take some time.
First thing, we can add the default parameters, limits, default template, filterable, sortable...

@sterrien
Copy link
Collaborator

I never do that before :-)
I'll try this tomorow.

@Abhoryo
Copy link
Member

Abhoryo commented Jun 28, 2012

Il faut définir le TreeBuilder de la configuration mais hélas, il n'y a pas beaucoup de documentation donc il faut s'aider des autres bundles existant. Après tu récupères la configuration sous forme de tableau que tu manipules.
J'en avais fait un pour un de mes bundles ici Mais depuis ça s'est amélioré donc il faut chercher un peu.

@sterrien
Copy link
Collaborator

C'est comme ça que j'ai commencé. J'ai trouvé des liens pas mal, et j'ai du monde au taf pour m'aider aussi !
(fait chier les italiens ont gagné...)

@Abhoryo
Copy link
Member

Abhoryo commented Jun 28, 2012

Tu taffes professionnellement sur Symfony ?

@sterrien
Copy link
Collaborator

Ouais, on est passé sous Symfony depuis 6mois/1an.

@Abhoryo
Copy link
Member

Abhoryo commented Jun 29, 2012

C'est bien. Dans ma région, Symfony est un peu inexistant au niveau professionnel.

@sterrien
Copy link
Collaborator

Ouais j'imagine. Sur Paris c'est déjà un peu plus présent je pense.

Concernant la conf YAML, je viens de pousser un commit qui permet de définir la valeur par défaut de limits dans config.yml.

Pour les autres paramètres, Je trouve que c'est moins pertinent.

@Abhoryo
Copy link
Member

Abhoryo commented Jun 29, 2012

Peut-être pour le template de base par défaut (blocks.html).

@patie
Copy link

patie commented Feb 13, 2013

Thanks for debate in english for everyone who do not speak french

@Abhoryo
Copy link
Member

Abhoryo commented Feb 13, 2013

Sorry patie, this was not really about this bundle.

@hmert hmert modified the milestone: 2.3 Dec 13, 2015
@hmert hmert closed this as completed Dec 13, 2015
@qferr qferr mentioned this issue Dec 22, 2015
29 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants