Skip to content

Hooks ​

reinos_maps_fieldtype_save_data ​

(added in v1.0.0)

Called after an entry with a Maps field has been saved. $data is the saved (base64 encoded) field data.

 ee()->extensions->call('reinos_maps_fieldtype_save_data', $data, $entry_id, $field_id, $col_id, $row_id, $fluid_field_data_id);

In a Grid, $field_id is the ID of the Grid field and $col_id / $row_id are the column and the row of the Maps field (available from v5.0.0, before that $field_id was the column ID). Outside a Grid they are 0. In a Fluid field $field_id is the ID of the Maps field and $fluid_field_data_id the Fluid item, because a Fluid field can hold the same Maps field more than once (available from v5.0.0). Outside a Fluid field it is 0.

reinos_maps_fieldtype_delete_data ​

(added in v5.0.0)

Called when an entry with a Maps field is deleted, or a Grid row with a Maps field is removed.

 ee()->extensions->call('reinos_maps_fieldtype_delete_data', $entry_ids, $field_id, $col_id, $row_ids);

$entry_ids is an array of entry IDs. In a Grid, $field_id is the ID of the Grid field, $col_id the column and $row_ids the deleted rows of the entry; outside a Grid $col_id is 0 and $row_ids is empty.

This hook is not called when an item is removed from a Fluid field, ExpressionEngine doesn't tell the field about that. Use the fluid_field_remove_field hook of ExpressionEngine for that.