Commit 72ffb342 authored by chr.fritsch's avatar chr.fritsch Committed by bonus
Browse files

Issue #3266495 by chr.fritsch: Drupal 10 compatibility

parent f7b8ccf4
......@@ -2,6 +2,6 @@ name: Media entity Pinterest
description: 'Media entity Pinterest provider.'
type: module
package: Media
core_version_requirement: ^8.8 || ^9
core_version_requirement: ^9 || ^10
dependencies:
- drupal:media
......@@ -11,7 +11,9 @@ use Drupal\Core\File\FileSystemInterface;
* Implements hook_install().
*/
function media_entity_pinterest_install() {
$source = drupal_get_path('module', 'media_entity_pinterest') . '/images/icons';
/** @var \Drupal\Core\Extension\ModuleExtensionList $extension_list */
$extension_list = \Drupal::service("extension.list.module");
$source = dirname($extension_list->getPathname('media_entity_pinterest')) . '/images/icons';
$destination = \Drupal::config('media.settings')->get('icon_base_uri');
\Drupal::service('file_system')->prepareDirectory($destination, FileSystemInterface::CREATE_DIRECTORY | FileSystemInterface::MODIFY_PERMISSIONS);
......
Supports Markdown
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