diff --git a/core/modules/path/path.module b/core/modules/path/path.module index 9b865b6..73e8362 100644 --- a/core/modules/path/path.module +++ b/core/modules/path/path.module @@ -63,7 +63,7 @@ function path_field_is_empty($item, $field) { /** * Implements hook_field_insert(). */ -function path_field_insert($entity_type, $entity, $field, $instance, $langcode, &$items) { +function path_field_insert(EntityInterface $entity, $field, $instance, $langcode, &$items) { foreach ($items as &$item) { $item['value'] = trim($item['value']); if (!empty($item['value'])) { @@ -81,7 +81,7 @@ function path_field_insert($entity_type, $entity, $field, $instance, $langcode, /** * Implements hook_field_update(). */ -function path_field_update($entity_type, $entity, $field, $instance, $langcode, &$items) { +function path_field_update(EntityInterface $entity, $field, $instance, $langcode, &$items) { $path_crud = drupal_container()->get('path.crud'); foreach ($items as &$item) { $item['value'] = trim($item['value']); @@ -123,7 +123,7 @@ function path_field_update($entity_type, $entity, $field, $instance, $langcode, /** * Implements hook_field_delete(). */ -function path_field_delete($entity_type, $entity, $field, $instance, $langcode, &$items) { +function path_field_delete(EntityInterface $entity, $field, $instance, $langcode, &$items) { foreach ($items as $item) { if (!empty($item['pid'])) { drupal_container()->get('path.crud')->delete(array('pid' => $item['pid'])); @@ -252,7 +252,7 @@ function path_entity_delete(EntityInterface $entity) { /** * Implements hook_path_delete(). */ -function path_path_delete($path) { +function path_path_delete(array $path) { // EntityFieldQuery does not support field queries across entity types, so // iterate over all path field instances individually and update their field // values accordingly.