PHP Class FluentFilteredExtension

Author: Damian Mooyman ([email protected])
Inheritance: extends DataExtension
Datei anzeigen Open project: tractorcow/silverstripe-fluent

Public Methods

Method Description
augmentDataQueryCreation ( SQLQuery $query, DataQuery $dataQuery ) Amend freshly created DataQuery objects with the "should filter admin?" option, current locale and frontend status
augmentSQL ( SQLQuery &$query, DataQuery &$dataQuery = null )
canViewInLocale ( string | null $locale = null ) : boolean Determine if this object is visible (or excluded) in the specified (or current) locale
getFilteredLocales ( boolean $visible = true ) : array Gets the list of locales this items is filtered against
get_extra_config ( $class, $extension, $args )
setFilteredLocales ( $locales ) Set the filter of locales to the specified locale, or array of locales
updateCMSFields ( FieldList $fields )
updateStatusFlags ( array &$flags ) Add 'Hidden' flag to the SiteTree object if the page is not present in this locale

Method Details

augmentDataQueryCreation() public method

Amend freshly created DataQuery objects with the "should filter admin?" option, current locale and frontend status
public augmentDataQueryCreation ( SQLQuery $query, DataQuery $dataQuery )
$query SQLQuery
$dataQuery DataQuery

augmentSQL() public method

public augmentSQL ( SQLQuery &$query, DataQuery &$dataQuery = null )
$query SQLQuery
$dataQuery DataQuery

canViewInLocale() public method

Determine if this object is visible (or excluded) in the specified (or current) locale
public canViewInLocale ( string | null $locale = null ) : boolean
$locale string | null Locale to check against. If null, will use the current locale.
return boolean True if the object is visible in the specified locale

getFilteredLocales() public method

Gets the list of locales this items is filtered against
public getFilteredLocales ( boolean $visible = true ) : array
$visible boolean Set to false to get excluded instead of included locales
return array List of locales

get_extra_config() public static method

public static get_extra_config ( $class, $extension, $args )

setFilteredLocales() public method

Set the filter of locales to the specified locale, or array of locales
public setFilteredLocales ( $locales )

updateCMSFields() public method

public updateCMSFields ( FieldList $fields )
$fields FieldList

updateStatusFlags() public method

Add 'Hidden' flag to the SiteTree object if the page is not present in this locale
public updateStatusFlags ( array &$flags )
$flags array