You are here

public function EROptionsBehavior::update in Bricks​ 7.5

Same name and namespace in other branches
  1. 7.4 plugins/behavior/EROptionsBehavior.class.php \EROptionsBehavior::update()

Act before updating an entity reference field.

Overrides EntityReference_BehaviorHandler_Abstract::update

See also

hook_field_update()

File

plugins/behavior/EROptionsBehavior.class.php, line 27

Class

EROptionsBehavior

Code

public function update($entity_type, $entity, $field, $instance, $langcode, &$items) {
  foreach ($items as &$item) {
    $item['options'] = serialize($item['options']);
  }
}