Issue #2154711 followup by by jlbellido: Move entity_get_(form/view)_mode_options() functions to EntityManager and add get(Form/View)ModeOptions() methods.

8.0.x
Alex Pott 2014-04-06 14:23:22 +01:00
parent 407f1d1180
commit 1df1d3b35c
1 changed files with 0 additions and 44 deletions

View File

@ -79,50 +79,6 @@ function entity_invoke_bundle_hook($hook, $entity_type, $bundle, $bundle_new = N
\Drupal::moduleHandler()->invokeAll('entity_bundle_' . $hook, array($entity_type, $bundle, $bundle_new));
}
/**
* Returns the entity form mode info.
*
* @param string|null $entity_type_id
* The entity type whose form mode info should be returned, or NULL for all
* form mode info. Defaults to NULL.
*
* @return array
* The form mode info for a specific entity type, or all entity types.
*
* @deprecated Use \Drupal::entityManager()->getFormModes() or
* \Drupal::entityManager()->getAllFormModes().
*/
function entity_get_form_modes($entity_type_id = NULL) {
if (isset($entity_type_id)) {
return \Drupal::entityManager()->getFormModes($entity_type_id);
}
else {
return \Drupal::entityManager()->getAllFormModes();
}
}
/**
* Returns the entity view mode info.
*
* @param string|null $entity_type_id
* The entity type whose view mode info should be returned, or NULL for all
* view mode info. Defaults to NULL.
*
* @return array
* The view mode info for a specific entity type, or all entity types.
*
* @deprecated Use \Drupal::entityManager()->getViewModes() or
* \Drupal::entityManager()->getAllViewModes().
*/
function entity_get_view_modes($entity_type_id = NULL) {
if (isset($entity_type_id)) {
return \Drupal::entityManager()->getViewModes($entity_type_id);
}
else {
return \Drupal::entityManager()->getAllViewModes();
}
}
/**
* Loads an entity from the database.
*