You are here

protected function FeedsEntityProcessor::entityWrapper in Feeds entity processor 7

Returns the entity wrapper metadata for the processor's entity type.

Parameters

object $entity: (optional) The entity object to wrap.

Return value

EntityMetadataWrapper An entity metadata wrapper.

5 calls to FeedsEntityProcessor::entityWrapper()
FeedsEntityProcessor::configForm in src/FeedsEntityProcessor.inc
Overrides parent::configForm().
FeedsEntityProcessor::configFormValidate in src/FeedsEntityProcessor.inc
Overrides parent::configFormValidate().
FeedsEntityProcessor::getMappingTargets in src/FeedsEntityProcessor.inc
Overrides parent::getMappingTargets().
FeedsEntityProcessor::newEntity in src/FeedsEntityProcessor.inc
Implements FeedsProcessor::newEntity().
FeedsEntityProcessor::setTargetElement in src/FeedsEntityProcessor.inc

File

src/FeedsEntityProcessor.inc, line 100
Contains FeedsEntityProcessor.

Class

FeedsEntityProcessor
Creates entities from feed items.

Code

protected function entityWrapper($entity = NULL) {
  if ($this
    ->bundleKey()) {
    return entity_metadata_wrapper($this
      ->entityType(), $entity, array(
      'bundle' => $this
        ->bundle(),
    ));
  }
  return entity_metadata_wrapper($this
    ->entityType(), $entity);
}