Skip to content
Snippets Groups Projects
Commit c6df3e5f authored by Martin Giessing's avatar Martin Giessing
Browse files

Issue #3412037 by erik_petra: Error: Class "ResponsiveImageFormatter" not found

parent 7b3ea1a0
No related branches found
No related tags found
No related merge requests found
<?php
namespace Drupal\transform_api\Plugin\Transform\Field;
namespace Drupal\transform_api_responsive_image\Plugin\Transform\Field;
use Drupal\Core\Cache\CacheableMetadata;
use Drupal\Core\Field\FieldItemListInterface;
......@@ -97,7 +97,7 @@ class ResponsiveImageTransform extends ResponsiveImageFormatter implements Field
foreach ($sources as $source) {
$parts = explode(" ", trim($source));
$url = $this->pathToUrl($parts[0]);
$result[] = $url->toString() . ' ' . $parts[1];
$result[] = $url->toString() . ' ResponsiveImageTransform.php' . $parts[1];
}
return implode(', ', $result);
}
......
name: Transform API Responsive Image
description: Adds responsive image features to Transform API.
type: module
package: Web services
core_version_requirement: ^9 || ^10
dependencies:
- core:responsive_image
- transform_api:transform_api
......@@ -24,3 +24,12 @@ function transform_api_update_9002() {
\Drupal::entityDefinitionUpdateManager()
->installEntityType(\Drupal::entityTypeManager()->getDefinition('transform_block'));
}
/**
* Install transform_api_responsive_image.
*/
function transform_api_update_9003() {
/** @var \Drupal\Core\Extension\ModuleInstaller $installer */
$installer = \Drupal::service('module_installer');
$installer->install(['transform_api_responsive_image']);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment