You are here

public function EntityReferenceInstanceBehaviorExample::insert in Entity reference 7

Act before inserting an entity reference field.

Overrides EntityReference_BehaviorHandler_Abstract::insert

See also

hook_field_insert()

File

examples/entityreference_behavior_example/plugins/behavior/EntityReferenceInstanceBehaviorExample.class.php, line 9

Class

EntityReferenceInstanceBehaviorExample

Code

public function insert($entity_type, $entity, $field, $instance, $langcode, &$items) {
  drupal_set_message(t('Do something on insert, on the instance level!'));
}