\BlogPostFilter
This is responsible for filtering only published posts to users who do not have permission to view non-published posts.
- Author: Michael Strong <github@michaelstrong.co.uk>
Synopsis
class BlogPostFilter
extends DataExtension
{
- // methods
- public void augmentSQL()
- public void augmentLoadLazyFields()
Hierarchy
Extends
- DataExtension
Methods
public
- augmentLoadLazyFields() — This is a fix so that when we try to fetch subclasses of BlogPost, lazy loading includes the BlogPost table in its query. Leaving this table out means the default sort order column PublishDate causes an error.
- augmentSQL() — Augment queries so that we don't fetch unpublished articles.