AssetIndexer

Type
Class
Namespace
craft\services
Inherits
craft\services\AssetIndexer » yii\base\Component (opens new window) » yii\base\BaseObject (opens new window)
Implements
yii\base\Configurable (opens new window)
Since
3.0.0

Class AssetIndexer

See also http://craftcms.com

View source (opens new window)

# Public Properties

Property Description
behaviors (opens new window) yii\base\Behavior (opens new window) – List of behaviors attached to this component
indexingSessionId string (opens new window)

# indexingSessionId

Type
string (opens new window)
Default value
null
Access
Read-only

View source (opens new window)

# Public Methods

Method Description
__call() (opens new window) Calls the named method which is not a class method.
__clone() (opens new window) This method is called after the object is created by cloning an existing one.
__construct() (opens new window) Constructor.
__get() (opens new window) Returns the value of an object property.
__isset() (opens new window) Checks if a property is set, i.e. defined and not null.
__set() (opens new window) Sets value of an object property.
__unset() (opens new window) Sets an object property to null.
attachBehavior() (opens new window) Attaches a behavior to this component.
attachBehaviors() (opens new window) Attaches a list of behaviors to the component.
behaviors() (opens new window) Returns a list of behaviors that this component should behave as.
canGetProperty() (opens new window) Returns a value indicating whether a property can be read.
canSetProperty() (opens new window) Returns a value indicating whether a property can be set.
className() (opens new window) Returns the fully qualified name of this class.
deleteStaleIndexingData() Clean up stale asset indexing data. Stale indexing data is all session data for sessions that have all the recordIds set.
detachBehavior() (opens new window) Detaches a behavior from the component.
detachBehaviors() (opens new window) Detaches all behaviors from the component.
ensureBehaviors() (opens new window) Makes sure that the behaviors declared in behaviors() (opens new window) are attached to this component.
extractFolderItemsFromIndexList() Remove folder items from an index list and return their paths.
extractSkippedItemsFromIndexList() Remove skipped items from an index list and return their paths.
getBehavior() (opens new window) Returns the named behavior object.
getBehaviors() (opens new window) Returns all behaviors attached to this component.
getIndexListOnVolume() Returns a sorted list of files on a volume.
getIndexingSessionId() Returns a unique indexing session id.
getMissingFiles() Return a list of missing files for an indexing session.
getNextIndexEntry() Returns the next item to index in an indexing session.
hasEventHandlers() (opens new window) Returns a value indicating whether there is any handler attached to the named event.
hasMethod() (opens new window) Returns a value indicating whether a method is defined.
hasProperty() (opens new window) Returns a value indicating whether a property is defined.
indexFile() Index a single file by Volume and path.
indexFileByEntry() Indexes a file by its index entry.
init() (opens new window) Initializes the object.
off() (opens new window) Detaches an existing event handler from this component.
on() (opens new window) Attaches an event handler to an event.
prepareIndexList() Gets the index list for a volume.
processIndexForVolume() Process index for a volume.
storeIndexList() Store the index list in the index data table.
trigger() (opens new window) Triggers an event.
updateIndexEntry() Update indexing-process related data on an index entry.

# deleteStaleIndexingData()

Clean up stale asset indexing data. Stale indexing data is all session data for sessions that have all the recordIds set.

View source (opens new window)

Throws

# extractFolderItemsFromIndexList()

Remove folder items from an index list and return their paths.

View source (opens new window)

Arguments

Returns

array (opens new window)

# extractSkippedItemsFromIndexList()

Remove skipped items from an index list and return their paths.

View source (opens new window)

Arguments

Returns

array (opens new window)

# getIndexListOnVolume()

Returns a sorted list of files on a volume.

View source (opens new window)

Arguments

Returns

array (opens new window)

# getIndexingSessionId()

Returns a unique indexing session id.

View source (opens new window)

Returns

string (opens new window)

# getMissingFiles()

Return a list of missing files for an indexing session.

View source (opens new window)

Arguments

Returns

array (opens new window)

# getNextIndexEntry()

Returns the next item to index in an indexing session.

View source (opens new window)

Arguments

Returns

craft\models\AssetIndexData, null (opens new window)

# indexFile()

Index a single file by Volume and path.

View source (opens new window)

Arguments

Returns

boolean (opens new window), craft\elements\Asset

Throws

# indexFileByEntry()

Indexes a file by its index entry.

View source (opens new window)

Arguments

Returns

boolean (opens new window), craft\elements\Asset

Throws

# prepareIndexList()

Gets the index list for a volume.

View source (opens new window)

Arguments

Returns

array (opens new window)

# processIndexForVolume()

Process index for a volume.

View source (opens new window)

Arguments

Returns

mixed

# storeIndexList()

Store the index list in the index data table.

View source (opens new window)

Arguments

# updateIndexEntry()

Update indexing-process related data on an index entry.

View source (opens new window)

Arguments