You are here

function image_replace_rebuild_mapping_action in Image Replace 7

Rules action callback: Rebuild image replacement mapping for a given entity.

Parameters

EntityMetadataWrapper $wrapper: The entity for which the mapping should be rebuilt.

File

./image_replace.rules.inc, line 32
Rules integration for Image Replace module.

Code

function image_replace_rebuild_mapping_action(EntityMetadataWrapper $wrapper) {
  image_replace_field_attach_presave($wrapper
    ->type(), $wrapper
    ->value());
}