You are here

public function Image::__construct in Drupal 10

Same name in this branch
  1. 10 core/lib/Drupal/Core/Image/Image.php \Drupal\Core\Image\Image::__construct()
  2. 10 core/modules/media/src/Plugin/media/Source/Image.php \Drupal\media\Plugin\media\Source\Image::__construct()
Same name and namespace in other branches
  1. 8 core/modules/media/src/Plugin/media/Source/Image.php \Drupal\media\Plugin\media\Source\Image::__construct()
  2. 9 core/modules/media/src/Plugin/media/Source/Image.php \Drupal\media\Plugin\media\Source\Image::__construct()

Constructs a new class instance.

Parameters

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin_id for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: Entity type manager service.

\Drupal\Core\Entity\EntityFieldManagerInterface $entity_field_manager: Entity field manager service.

\Drupal\Core\Field\FieldTypePluginManagerInterface $field_type_manager: The field type plugin manager service.

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory service.

\Drupal\Core\Image\ImageFactory $image_factory: The image factory.

\Drupal\Core\File\FileSystemInterface $file_system: The file system service.

Overrides MediaSourceBase::__construct

File

core/modules/media/src/Plugin/media/Source/Image.php, line 82

Class

Image
Image entity media source.

Namespace

Drupal\media\Plugin\media\Source

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entity_type_manager, EntityFieldManagerInterface $entity_field_manager, FieldTypePluginManagerInterface $field_type_manager, ConfigFactoryInterface $config_factory, ImageFactory $image_factory, FileSystemInterface $file_system) {
  parent::__construct($configuration, $plugin_id, $plugin_definition, $entity_type_manager, $entity_field_manager, $field_type_manager, $config_factory);
  $this->imageFactory = $image_factory;
  $this->fileSystem = $file_system;
}