omines / datatables-bundle

DataTables bundle for Symfony
https://omines.github.io/datatables-bundle/
MIT License
258 stars 115 forks source link

Documentation syntax error - Customizing criteria #58

Closed 99hops closed 5 years ago

99hops commented 5 years ago

Under Customizing criteria

$table->createAdapter(ORMAdapter::class, [
    'entity' => Employee::class,
    'criteria' => [
        function () {
            return Criteria::create()->andWhere(new Comparison('c.name', Comparison::CONTAINS, 'ny 2'));
        },
        new SearchCriteriaProvider(),
    },
]);

Should be

$table->createAdapter(ORMAdapter::class, [
    'entity' => Employee::class,
    'criteria' => [
        function () {
            return Criteria::create()->andWhere(new Comparison('c.name', Comparison::CONTAINS, 'ny 2'));
        },
        new SearchCriteriaProvider(),
    ],
]);

Note the bracket under SearchCriteriaProvider() - ] (sorry for the formatting for some reason the "code" block doesn't work as expected)

curry684 commented 5 years ago

Makes sense, but why no PR? 😉

99hops commented 5 years ago

I am taking about the documentation at https://omines.github.io/datatables-bundle/ not the one included in this repository :smile: I'm submitting a pull request for master/docs/source/index.html.md anyway.

curry684 commented 5 years ago

That documentation is generated from the docs folder 😉

curry684 commented 5 years ago

Fixed @ PR, will be released next time I build the docs.