PHP Class FluentFilteredExtension

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

Méthodes publiques

Méthode 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 méthode

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 méthode

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

canViewInLocale() public méthode

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.
Résultat boolean True if the object is visible in the specified locale

getFilteredLocales() public méthode

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
Résultat array List of locales

get_extra_config() public static méthode

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

setFilteredLocales() public méthode

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

updateCMSFields() public méthode

public updateCMSFields ( FieldList $fields )
$fields FieldList

updateStatusFlags() public méthode

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