Coder Social home page Coder Social logo

Comments (4)

Matzz avatar Matzz commented on September 28, 2024

+1

from lexikformfilterbundle.

cedric-g avatar cedric-g commented on September 28, 2024

Hi :)
Yes we can add a section about that if it helps, but a filter type is basically a form type.
In the current version of the bundle the only difference between types we provide and types provided by SF is a filter type extends AbstractFilterType instead of directly extends Symfony\Component\Form\AbstractType. Filters are applied by the Filters classes, these classes are defined as services in filters.xml

Example:
If you look a the DateFilterType you will see the class is simple, we just define the transformer_id to extract data from the form. Then the date filter is applied on the query builder by the DateFilter.
Note that DateFilter::getName() return the same name as DateFilterType::getName(), this is the way a filter class is related to a filter type.

from lexikformfilterbundle.

Matzz avatar Matzz commented on September 28, 2024

Figure out how FilterType, data transformer and Filter classes works and how they are connected (via events as far as I understand) takes some time. So some docs would be very helpfull.

from lexikformfilterbundle.

TNAJanssen avatar TNAJanssen commented on September 28, 2024

@cedric-g When you explained like this i got it working! I must say nice bundle!

from lexikformfilterbundle.

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.