|
|
@ -3,6 +3,7 @@ |
|
|
|
namespace Drupal\islandora\Plugin\Action; |
|
|
|
namespace Drupal\islandora\Plugin\Action; |
|
|
|
|
|
|
|
|
|
|
|
use Drupal\Core\Config\ConfigFactoryInterface; |
|
|
|
use Drupal\Core\Config\ConfigFactoryInterface; |
|
|
|
|
|
|
|
use Drupal\Core\Entity\EntityFieldManagerInterface; |
|
|
|
use Drupal\Core\Entity\EntityTypeManagerInterface; |
|
|
|
use Drupal\Core\Entity\EntityTypeManagerInterface; |
|
|
|
use Drupal\Core\Messenger\MessengerInterface; |
|
|
|
use Drupal\Core\Messenger\MessengerInterface; |
|
|
|
use Drupal\Core\Session\AccountInterface; |
|
|
|
use Drupal\Core\Session\AccountInterface; |
|
|
@ -55,6 +56,13 @@ class AbstractGenerateDerivativeBase extends EmitEvent { |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
protected $config; |
|
|
|
protected $config; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* The entity field manager. |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @var \Drupal\Core\Entity\EntityFieldManager |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
protected $entityFieldManager; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Constructs a EmitEvent action. |
|
|
|
* Constructs a EmitEvent action. |
|
|
|
* |
|
|
|
* |
|
|
@ -84,6 +92,8 @@ class AbstractGenerateDerivativeBase extends EmitEvent { |
|
|
|
* The messenger. |
|
|
|
* The messenger. |
|
|
|
* @param \Drupal\Core\Config\ConfigFactoryInterface $config |
|
|
|
* @param \Drupal\Core\Config\ConfigFactoryInterface $config |
|
|
|
* The system file config. |
|
|
|
* The system file config. |
|
|
|
|
|
|
|
* @param \Drupal\Core\Entity\EntityFieldManagerInterface $entity_field_manager |
|
|
|
|
|
|
|
* Field Manager service. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public function __construct( |
|
|
|
public function __construct( |
|
|
|
array $configuration, |
|
|
|
array $configuration, |
|
|
@ -98,13 +108,15 @@ class AbstractGenerateDerivativeBase extends EmitEvent { |
|
|
|
MediaSourceService $media_source, |
|
|
|
MediaSourceService $media_source, |
|
|
|
TokenInterface $token, |
|
|
|
TokenInterface $token, |
|
|
|
MessengerInterface $messenger, |
|
|
|
MessengerInterface $messenger, |
|
|
|
ConfigFactoryInterface $config |
|
|
|
ConfigFactoryInterface $config, |
|
|
|
|
|
|
|
EntityFieldManagerInterface $entity_field_manager |
|
|
|
) { |
|
|
|
) { |
|
|
|
$this->utils = $utils; |
|
|
|
$this->utils = $utils; |
|
|
|
$this->mediaSource = $media_source; |
|
|
|
$this->mediaSource = $media_source; |
|
|
|
$this->token = $token; |
|
|
|
$this->token = $token; |
|
|
|
$this->messenger = $messenger; |
|
|
|
$this->messenger = $messenger; |
|
|
|
$this->config = $config->get('system.file'); |
|
|
|
$this->config = $config->get('system.file'); |
|
|
|
|
|
|
|
$this->entityFieldManager = $entity_field_manager; |
|
|
|
parent::__construct( |
|
|
|
parent::__construct( |
|
|
|
$configuration, |
|
|
|
$configuration, |
|
|
|
$plugin_id, |
|
|
|
$plugin_id, |
|
|
@ -135,7 +147,8 @@ class AbstractGenerateDerivativeBase extends EmitEvent { |
|
|
|
$container->get('islandora.media_source_service'), |
|
|
|
$container->get('islandora.media_source_service'), |
|
|
|
$container->get('token'), |
|
|
|
$container->get('token'), |
|
|
|
$container->get('messenger'), |
|
|
|
$container->get('messenger'), |
|
|
|
$container->get('config.factory') |
|
|
|
$container->get('config.factory'), |
|
|
|
|
|
|
|
$container->get('entity_field.manager') |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|