1 | <?php |
||
21 | class BlogPostFilter extends DataExtension |
||
22 | { |
||
23 | /** |
||
24 | * Augment queries so that we don't fetch unpublished articles. |
||
25 | * |
||
26 | * @param SQLSelect $query |
||
27 | * @param DataQuery $query |
||
28 | */ |
||
29 | public function augmentSQL(SQLSelect $query, DataQuery $dataQuery = null) |
||
44 | |||
45 | /** |
||
46 | * {@inheritDoc} |
||
47 | * |
||
48 | * This is a fix so that when we try to fetch subclasses of BlogPost, lazy loading includes the |
||
49 | * BlogPost table in its query. Leaving this table out means the default sort order column |
||
50 | * PublishDate causes an error. |
||
51 | * |
||
52 | * @see https://github.com/silverstripe/silverstripe-framework/issues/1682 |
||
53 | * |
||
54 | * @param SQLSelect $query |
||
55 | * @param DataQuery $dataQuery |
||
56 | * @param DataObject $dataObject |
||
57 | */ |
||
58 | public function augmentLoadLazyFields(SQLSelect &$query, DataQuery &$dataQuery = null, $dataObject) |
||
65 | } |
||
66 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.