You are here

public function CerPresetHandler::__construct in Corresponding Entity References 7.3

File

includes/CerPresetHandler.inc, line 35
Contains CerPresetHandler.

Class

CerPresetHandler
@class Contains the logic for performing CER operations on a single entity, using a single preset.

Code

public function __construct(CerPreset $preset, EntityDrupalWrapper $entity) {
  $this->left = $preset->wrapper->cer_left->chain
    ->value();
  $this->right = $preset->wrapper->cer_right->chain
    ->value();
  $this->entity = $entity;

  // Store the current set of reference IDs so that we only need to instantiate
  // the left handler once.
  $this->refIDs = $this->left
    ->getHandler($entity)
    ->getIDs();
}