Commit 5aa11b37 authored by amateescu's avatar amateescu

Issue #2704219 followup by amateescu: Removed deprecated method render and...

Issue #2704219 followup by amateescu: Removed deprecated method render and entityManager from code base
parent e256351b
......@@ -329,7 +329,7 @@ function xmlsitemap_uninstall() {
xmlsitemap_clear_directory(NULL, TRUE);
$entities = \Drupal::entityTypeManager()->getDefinitions();
$bundles = \Drupal::entityTypeManager()->getAllBundleInfo();
$bundles = \Drupal::service('entity_type.bundle.info')->getAllBundleInfo();
$state_variables = array();
foreach ($entities as $entity_id => $entity) {
......
......@@ -635,13 +635,13 @@ function xmlsitemap_get_link_info($type = NULL, $reset = FALSE) {
'label' => $entity_type->getLabel(),
'type' => $entity_type->id(),
'base table' => $entity_type->getBaseTable(),
'bundles' => \Drupal::entityTypeManager()->getBundleInfo($entity_type->id()),
'bundles' => \Drupal::service('entity_type.bundle.info')->getBundleInfo($entity_type->id()),
);
$uri_callback = $entity_type->getUriCallback();
if (empty($uri_callback) || !isset($entity_type->xmlsitemap)) {
// Remove any non URL-able or XML sitemap un-supported entites.
}
foreach (\Drupal::entityTypeManager()->getBundleInfo($entity_type->id()) as $bundle_key => $bundle) {
foreach (\Drupal::service('entity_type.bundle.info')->getBundleInfo($entity_type->id()) as $bundle_key => $bundle) {
if (!isset($bundle['xmlsitemap'])) {
// Remove any un-supported entity bundles.
}
......@@ -1554,7 +1554,7 @@ function xmlsitemap_form_alter(array &$form, FormStateInterface $form_state, $fo
*/
function xmlsitemap_xmlsitemap_index_links($limit) {
$entity_types = \Drupal::entityTypeManager()->getDefinitions();
$bundles = \Drupal::entityTypeManager()->getAllBundleInfo();
$bundles = \Drupal::service('entity_type.bundle.info')->getAllBundleInfo();
foreach ($entity_types as $entity_type_id => $entity_type) {
$entity_bundles = array();
foreach ($bundles[$entity_type_id] as $bundle => $bundle_info) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment