You are here

public static function EntityReference_SelectionHandler_DDF::storeControllingFieldValues in Dynamic dependent fields 7

1 call to EntityReference_SelectionHandler_DDF::storeControllingFieldValues()
ddf_entityreference_ddf_update_widget in modules/ddf_entityreference/ddf_entityreference.module
Implements hook_ddf_update_widget().

File

modules/ddf_entityreference/plugins/selection/EntityReference_SelectionHandler_DDF.class.php, line 11

Class

EntityReference_SelectionHandler_DDF
Entity handler for Views.

Code

public static function storeControllingFieldValues($values, $entity_type, $entity) {
  $entity_id = 0;
  if (!is_null($entity)) {
    list($entity_id, , ) = entity_extract_ids($entity_type, $entity);
    if (empty($entity_id)) {
      $entity_id = 0;
    }
  }
  self::$controlling_field_values[$entity_type][$entity_id] = array();
  foreach ($values as $key => $value) {
    self::$controlling_field_values[$entity_type][$entity_id][$key] = $value;
  }
}