comparison core/modules/media/media.module @ 5:12f9dff5fda9 tip

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:34:47 +0100
parents a9cd425dd02b
children
comparison
equal deleted inserted replaced
4:a9cd425dd02b 5:12f9dff5fda9
75 'base hook' => 'field_multiple_value_form', 75 'base hook' => 'field_multiple_value_form',
76 ], 76 ],
77 'media_oembed_iframe' => [ 77 'media_oembed_iframe' => [
78 'variables' => [ 78 'variables' => [
79 'media' => NULL, 79 'media' => NULL,
80 'placeholder_token' => '',
80 ], 81 ],
81 ], 82 ],
82 ]; 83 ];
83 } 84 }
84 85
345 return Url::fromRoute('entity.media.add_page')->toString(); 346 return Url::fromRoute('entity.media.add_page')->toString();
346 } 347 }
347 348
348 return FALSE; 349 return FALSE;
349 } 350 }
351
352 /**
353 * Implements hook_entity_type_alter().
354 */
355 function media_entity_type_alter(array &$entity_types) {
356 if (\Drupal::config('media.settings')->get('standalone_url')) {
357 /** @var \Drupal\Core\Entity\ContentEntityTypeInterface $entity_type */
358 $entity_type = $entity_types['media'];
359 $entity_type->setLinkTemplate('canonical', '/media/{media}');
360 }
361 }