IEagerLoadingFieldType

Type
Interface
Namespace
Craft
Implemented by
Craft\AssetsFieldType, Craft\BaseElementFieldType, Craft\CategoriesFieldType, Craft\EntriesFieldType, Craft\MatrixFieldType, Craft\TagsFieldType, Craft\UsersFieldType
Since
1.0

Interface IEagerLoadingFieldType

See also http://craftcms.com

View source (opens new window)

# Public Methods

Method Description
getEagerLoadingMap() Returns an array that maps source-to-target element IDs based on this custom field.

# getEagerLoadingMap()

Returns an array that maps source-to-target element IDs based on this custom field. This method aids in the eager-loading of elements when performing an element query. The returned array should contain two sub-keys:

  • elementType – indicating the type of sub-elements to eager-load (the element type class handle)
  • map – an array of element ID mappings, where each element is a sub-array with source and target keys.

View source (opens new window)

Arguments

Returns

array (opens new window), false (opens new window) – The eager-loading element ID mappings, or false if no mappings exist

Signature

public abstract array, false getEagerLoadingMap ( $sourceElements )