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

Public Methods

MethodDescription
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

Arguments

Returns

array, false – The eager-loading element ID mappings, or false if no mappings exist

Signature

public abstract array, false getEagerLoadingMap ( $sourceElements )