Skip to content
Snippets Groups Projects
Commit 0bf7dc54 authored by Angie Byron's avatar Angie Byron
Browse files

Issue #1618164 by aspilicious, fago: Remove the possibility to define custom 'load hooks'.

parent bfa62876
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -36,9 +36,6 @@
* to disable Field API's persistent cache of field data. Only recommended
* if a higher level persistent cache is available for the entity type.
* Defaults to TRUE.
* - load hook: The name of the hook which should be invoked by
* Drupal\entity\DatabaseStorageController::attachLoad(), for example
* 'node_load'.
* - uri callback: A function taking an entity as argument and returning the
* uri elements of the entity, e.g. 'path' and 'options'. The actual entity
* uri can be constructed by passing these elements to url().
......
......@@ -73,7 +73,6 @@ function entity_get_info($entity_type = NULL) {
'controller class' => 'Drupal\entity\DatabaseStorageController',
'static cache' => TRUE,
'field cache' => TRUE,
'load hook' => $name . '_load',
'bundles' => array(),
'view modes' => array(),
'entity keys' => array(),
......
......@@ -304,8 +304,8 @@ protected function attachLoad(&$queried_entities, $revision_id = FALSE) {
// always the queried entities, followed by additional arguments set in
// $this->hookLoadArguments.
$args = array_merge(array($queried_entities), $this->hookLoadArguments);
foreach (module_implements($this->entityInfo['load hook']) as $module) {
call_user_func_array($module . '_' . $this->entityInfo['load hook'], $args);
foreach (module_implements($this->entityType . '_load') as $module) {
call_user_func_array($module . '_' . $this->entityType . '_load', $args);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment