DataObjectExtension
extends DataExtension
in package
Class \Firesphere\SolrSearch\Compat\DataObjectExtension
Extend every DataObject with the option to update the index.
Table of Contents
Properties
- $cachedClasses : array<string|int, mixed>
- $owner : DataObject|DataObjectExtension
- $siteConfig : SiteConfig
Methods
- doReindex() : mixed
- Reindex this owner object in Solr This is a simple stub for the push method, for semantic reasons It should never be called on Objects that are not a valid class for any Index It does not check if the class is valid to be pushed to Solr
- getViewStatus() : array<string|int, mixed>
- Get the view status for each member in this object
- onAfterDelete() : void
- Attempt to remove the item from Solr
- onAfterPublish() : mixed
- Push the item to Solr after publishing
- onAfterWrite() : mixed
- Push the item to solr if it is not versioned Update the index after write.
- clearIDs() : void
- Remove the owner ID from the dirty ID set
- getDirtyClass() : DirtyClass
- Find or create a new DirtyClass for recording dirty IDs
- getGroupViewPermissions() : array<string|int, mixed>
- Determine the view permissions based on group settings
- pushToSolr() : mixed
- Try to push the newly updated item to Solr
- registerException() : void
- Register the exception of the attempted index for later clean-up use
- shouldPush() : bool
- Should this write be pushed to Solr
Properties
$cachedClasses
public
static array<string|int, mixed>
$cachedClasses
Cached permission list
$owner
public
DataObject|DataObjectExtension
$owner
$siteConfig
protected
static SiteConfig
$siteConfig
Current siteconfig
Methods
doReindex()
Reindex this owner object in Solr This is a simple stub for the push method, for semantic reasons It should never be called on Objects that are not a valid class for any Index It does not check if the class is valid to be pushed to Solr
public
doReindex() : mixed
Tags
getViewStatus()
Get the view status for each member in this object
public
getViewStatus() : array<string|int, mixed>
Return values
array<string|int, mixed>onAfterDelete()
Attempt to remove the item from Solr
public
onAfterDelete() : void
Tags
onAfterPublish()
Push the item to Solr after publishing
public
onAfterPublish() : mixed
Tags
onAfterWrite()
Push the item to solr if it is not versioned Update the index after write.
public
onAfterWrite() : mixed
Tags
clearIDs()
Remove the owner ID from the dirty ID set
protected
clearIDs(DataObject $owner, array<string|int, mixed> $ids, DirtyClass $record) : void
Parameters
- $owner : DataObject
- $ids : array<string|int, mixed>
- $record : DirtyClass
Tags
getDirtyClass()
Find or create a new DirtyClass for recording dirty IDs
protected
getDirtyClass(string $type) : DirtyClass
Parameters
- $type : string
Tags
Return values
DirtyClassgetGroupViewPermissions()
Determine the view permissions based on group settings
protected
getGroupViewPermissions(DataObject|SiteTree|SiteConfig $owner) : array<string|int, mixed>
Parameters
- $owner : DataObject|SiteTree|SiteConfig
Return values
array<string|int, mixed>pushToSolr()
Try to push the newly updated item to Solr
protected
pushToSolr(DataObject $owner) : mixed
Parameters
- $owner : DataObject
Tags
registerException()
Register the exception of the attempted index for later clean-up use
protected
registerException(array<string|int, mixed> $ids, DirtyClass $record, Exception $error) : void
Parameters
- $ids : array<string|int, mixed>
- $record : DirtyClass
- $error : Exception
Tags
shouldPush()
Should this write be pushed to Solr
protected
shouldPush() : bool