Skip to content

Commit

Permalink
add notice about SearchCriteria availability
Browse files Browse the repository at this point in the history
  • Loading branch information
sarjon committed Dec 10, 2018
1 parent dff1271 commit 125b031
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/content/1.7/development/components/grid/_index.md
Expand Up @@ -158,6 +158,10 @@ $searchCriteria->getOffset(); // 0
$searchCriteria->getLimit(); // 10
```

{{% notice note %}}
Class `PrestaShop\PrestaShop\Core\Grid\Search\SearchCriteria` is only available since {{< minver v="1.7.6" >}}
{{% /notice %}}

When creating Search Criteria you can skip some or all it's data. You can leave default `null` values for order way
and order by to disable sorting or offset and limit to disable pagination.

Expand Down Expand Up @@ -192,7 +196,7 @@ you can implement your own Grid Data factory.
We will be using `DoctrineGridDataFactory` to create data for our Grid. When using `DoctrineGridDataFactory` you have
to implement `DoctrineQueryBuilderInterface` which will be used by data factory to build Doctrine queries.

{{% notice note %}}
{{% notice info %}}
When implementing `DoctrineQueryBuilderInterface` it is recommended to use `PrestaShop\PrestaShop\Core\Grid\Query\AbstractDoctrineQueryBuilder`
as it provides access to Doctrine `Connection` and database tables prefix.
{{% /notice %}}
Expand Down

0 comments on commit 125b031

Please sign in to comment.