Tripal
Public Member Functions | Static Public Attributes | List of all members
TripalStorage Class Reference

Public Member Functions

 info ()
 
 load ($entity_type, $entities, $age, $fields, $options)
 
 query ($query)
 

Static Public Attributes

static $information
 

Member Function Documentation

◆ info()

TripalStorage::info ( )

Provides default information about this storage type.

This function corresponds to the hook_field_storage_info() function of the Drupal Storage API.

Returns
An array whose keys the same as for the hook_field_storage_info() function.

◆ load()

TripalStorage::load (   $entity_type,
  $entities,
  $age,
  $fields,
  $options 
)

Loads the fields that are supported by the storage backend.

This function should behave just as the hook_field_storage_load() function. See the documentation for that hook for example implementation.

Parameters
$entity_typeThe type of entity (typically a bundle of TripalEntity).
unknown$entitiesThe array of entity objects to add fields to, keyed by entity ID.
unknown$ageFIELD_LOAD_CURRENT to load the most recent revision for all fields, or FIELD_LOAD_REVISION to load the version indicated by each entity.
unknown$fieldsAn array listing the fields to be loaded. The keys of the array are field IDs, and the values of the array are the entity IDs (or revision IDs, depending on the $age parameter) to add each field to.
unknown$optionsAn associative array of additional options, with the following keys:
  • deleted: If TRUE, deleted fields should be loaded as well as non-deleted fields. If unset or FALSE, only non-deleted fields should be loaded.

◆ query()

TripalStorage::query (   $query)

Searches for entities that match field conditions.

This function is similar to the hook_field_storage_query(). Each TripalStorage class is responsible for querying it's own storage system using the conditions provided in the $query argument.

Parameters
$queryA TripalFieldQuery object.
Returns
See EntityFieldQuery::execute() for the return values.

Member Data Documentation

◆ $information

TripalStorage::$information
static
Initial value:
= [
'label' => '',
'description' => '',
'settings' => [],
]

The documentation for this class was generated from the following file: