Giter Site home page Giter Site logo

grid configuration about apydatagridbundle HOT 17 CLOSED

apy avatar apy commented on May 21, 2024
grid configuration

from apydatagridbundle.

Comments (17)

worenga avatar worenga commented on May 21, 2024

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

from apydatagridbundle.

 avatar commented on May 21, 2024

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

from apydatagridbundle.

Abhoryo avatar Abhoryo commented on May 21, 2024

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');

from apydatagridbundle.

sterrien avatar sterrien commented on May 21, 2024

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'}

from apydatagridbundle.

Abhoryo avatar Abhoryo commented on May 21, 2024

It works with the current master ?

from apydatagridbundle.

sterrien avatar sterrien commented on May 21, 2024

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

from apydatagridbundle.

Abhoryo avatar Abhoryo commented on May 21, 2024

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...

from apydatagridbundle.

sterrien avatar sterrien commented on May 21, 2024

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

from apydatagridbundle.

Abhoryo avatar Abhoryo commented on May 21, 2024

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.

from apydatagridbundle.

sterrien avatar sterrien commented on May 21, 2024

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é...)

from apydatagridbundle.

Abhoryo avatar Abhoryo commented on May 21, 2024

Tu taffes professionnellement sur Symfony ?

from apydatagridbundle.

sterrien avatar sterrien commented on May 21, 2024

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

from apydatagridbundle.

Abhoryo avatar Abhoryo commented on May 21, 2024

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

from apydatagridbundle.

sterrien avatar sterrien commented on May 21, 2024

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.

from apydatagridbundle.

Abhoryo avatar Abhoryo commented on May 21, 2024

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

from apydatagridbundle.

patie avatar patie commented on May 21, 2024

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

from apydatagridbundle.

Abhoryo avatar Abhoryo commented on May 21, 2024

Sorry patie, this was not really about this bundle.

from apydatagridbundle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.