You are here

public function SearchApiEntityDataSourceController::getMetadataWrapper in Search API 7

Creates a metadata wrapper for this datasource controller's type.

Parameters

mixed $item: Unless NULL, an item of the item type for this controller to be wrapped.

array $info: Optionally, additional information that should be used for creating the wrapper. Uses the same format as entity_metadata_wrapper().

Return value

EntityMetadataWrapper A wrapper for the item type of this data source controller, according to the info array, and optionally loaded with the given data.

Throws

SearchApiDataSourceException If any error state was encountered.

Overrides SearchApiAbstractDataSourceController::getMetadataWrapper

See also

entity_metadata_wrapper()

File

includes/datasource_entity.inc, line 99
Contains the SearchApiEntityDataSourceController class.

Class

SearchApiEntityDataSourceController
Represents a datasource for all entities known to the Entity API.

Code

public function getMetadataWrapper($item = NULL, array $info = array()) {
  return entity_metadata_wrapper($this->entityType, $item, $info);
}