Compare commits
77 Commits
2.x
...
d9_islando
Author | SHA1 | Date |
---|---|---|
ezoller | f6a6f415d8 | 4 years ago |
elizoller | d8e7a2d9e3 | 4 years ago |
elizoller | ce14534e22 | 4 years ago |
elizoller | 433d033f72 | 4 years ago |
elizoller | 0ce9b3eb20 | 4 years ago |
elizoller | 51cd810cca | 4 years ago |
elizoller | 6a311c8b33 | 4 years ago |
ezoller | 788b57047a | 4 years ago |
ezoller | 8dc721007c | 4 years ago |
ezoller | 8606a96662 | 4 years ago |
elizoller | 3850750055 | 4 years ago |
elizoller | 33764db9ed | 4 years ago |
elizoller | e5c1038eeb | 4 years ago |
elizoller | 1ab05e79b6 | 4 years ago |
ezoller | 24ed82c475 | 4 years ago |
ezoller | 3c3262bd68 | 4 years ago |
ezoller | 4a8f23d0d6 | 4 years ago |
ezoller | 985f7789c3 | 4 years ago |
ezoller | a5f95057f0 | 4 years ago |
ezoller | 7a5bcfadb7 | 4 years ago |
ezoller | b713f4c996 | 4 years ago |
ezoller | 843fda996a | 4 years ago |
ezoller | 50a64ea304 | 4 years ago |
ezoller | 339391a952 | 4 years ago |
ezoller | f547b35c3e | 4 years ago |
ezoller | b9adac5c4c | 4 years ago |
ezoller | da26e5e5a7 | 4 years ago |
ezoller | 758fc1d22f | 4 years ago |
ezoller | 4f8fef8fbe | 4 years ago |
ezoller | 90b7553fe0 | 4 years ago |
ezoller | 1d19ca0ae8 | 4 years ago |
ezoller | 5543731683 | 4 years ago |
ezoller | 311196bc23 | 4 years ago |
ezoller | 637ef08981 | 4 years ago |
ezoller | 354d590615 | 4 years ago |
ezoller | 1083d928cc | 4 years ago |
ezoller | 3643ae925e | 4 years ago |
ezoller | d4e2c72a39 | 4 years ago |
ezoller | 36b959a5ec | 4 years ago |
ezoller | a7b26a7329 | 4 years ago |
ezoller | 5d35dba26d | 4 years ago |
ezoller | 6f51488dbb | 4 years ago |
ezoller | 697efee3b9 | 4 years ago |
ezoller | 2dc07e5adc | 4 years ago |
ezoller | ec4ee15637 | 4 years ago |
ezoller | 183b7075b2 | 4 years ago |
ezoller | 02e2cb22b5 | 4 years ago |
elizoller | 251f28ca6a | 4 years ago |
elizoller | 6b409dc6f7 | 4 years ago |
elizoller | a4b389b323 | 4 years ago |
elizoller | 073ec09767 | 4 years ago |
ezoller | 01fdcfb3ef | 4 years ago |
elizoller | fcf78dcfe1 | 4 years ago |
ezoller | 93bcac2178 | 4 years ago |
Eli Zoller | 5b08b765cb | 4 years ago |
Eli Zoller | 3172f9f55f | 4 years ago |
Eli Zoller | ec648e6e15 | 4 years ago |
Eli Zoller | de4fcbb00c | 4 years ago |
Eli Zoller | 8ed7611db2 | 4 years ago |
Eli Zoller | eecbd83689 | 4 years ago |
Eli Zoller | 51158aa3ca | 4 years ago |
Eli Zoller | 0b165a8278 | 4 years ago |
Eli Zoller | b2e71084c7 | 4 years ago |
Eli Zoller | d4a51bebe2 | 4 years ago |
Eli Zoller | 1ed788a6e8 | 4 years ago |
Eli Zoller | bb09637449 | 4 years ago |
Eli Zoller | 94c1931382 | 4 years ago |
Eli Zoller | 1e3dbaeef3 | 4 years ago |
Eli Zoller | 3bb741f9d7 | 4 years ago |
Eli Zoller | 96b496a360 | 4 years ago |
Eli Zoller | bba922f637 | 4 years ago |
Eli Zoller | 56ae235f51 | 4 years ago |
Eli Zoller | 2b726b9446 | 4 years ago |
elizoller | 406a75d4a9 | 4 years ago |
elizoller | 3b23a864fd | 4 years ago |
elizoller | 8eb7deec4c | 4 years ago |
elizoller | c44b957eae | 4 years ago |
82 changed files with 716 additions and 628 deletions
@ -1,5 +1,6 @@ |
|||||||
services: |
services: |
||||||
islandora.commands: |
islandora.commands: |
||||||
class: \Drupal\islandora\Commands\IslandoraCommands |
class: \Drupal\islandora\Commands\IslandoraCommands |
||||||
|
arguments: ['@entity_type.manager', '@current_user', '@account_switcher'] |
||||||
tags: |
tags: |
||||||
- { name: drush.command } |
- { name: drush.command } |
||||||
|
@ -0,0 +1,142 @@ |
|||||||
|
<?php |
||||||
|
|
||||||
|
namespace Drupal\islandora\Plugin\Action; |
||||||
|
|
||||||
|
use Drupal\Core\Config\ConfigFactoryInterface; |
||||||
|
use Drupal\Core\Entity\EntityTypeManagerInterface; |
||||||
|
use Drupal\Core\Messenger\MessengerInterface; |
||||||
|
use Drupal\Core\Session\AccountInterface; |
||||||
|
use Drupal\islandora\IslandoraUtils; |
||||||
|
use Drupal\islandora\EventGenerator\EmitEvent; |
||||||
|
use Drupal\islandora\EventGenerator\EventGeneratorInterface; |
||||||
|
use Drupal\islandora\MediaSource\MediaSourceService; |
||||||
|
use Drupal\jwt\Authentication\Provider\JwtAuth; |
||||||
|
use Drupal\token\TokenInterface; |
||||||
|
use Stomp\StatefulStomp; |
||||||
|
use Symfony\Component\DependencyInjection\ContainerInterface; |
||||||
|
|
||||||
|
/** |
||||||
|
* A base class for constructor/creator derivative generators. |
||||||
|
*/ |
||||||
|
class AbstractGenerateDerivativeBase extends EmitEvent { |
||||||
|
|
||||||
|
/** |
||||||
|
* Islandora utility functions. |
||||||
|
* |
||||||
|
* @var \Drupal\islandora\IslandoraUtils |
||||||
|
*/ |
||||||
|
protected $utils; |
||||||
|
|
||||||
|
/** |
||||||
|
* Media source service. |
||||||
|
* |
||||||
|
* @var \Drupal\islandora\MediaSource\MediaSourceService |
||||||
|
*/ |
||||||
|
protected $mediaSource; |
||||||
|
|
||||||
|
/** |
||||||
|
* Token replacement service. |
||||||
|
* |
||||||
|
* @var \Drupal\token\TokenInterface |
||||||
|
*/ |
||||||
|
protected $token; |
||||||
|
|
||||||
|
/** |
||||||
|
* The messenger. |
||||||
|
* |
||||||
|
* @var \Drupal\Core\Messenger\MessengerInterface |
||||||
|
*/ |
||||||
|
protected $messenger; |
||||||
|
|
||||||
|
/** |
||||||
|
* The system file config. |
||||||
|
* |
||||||
|
* @var \Drupal\Core\Config\ImmutableConfig |
||||||
|
*/ |
||||||
|
protected $config; |
||||||
|
|
||||||
|
/** |
||||||
|
* Constructs a EmitEvent action. |
||||||
|
* |
||||||
|
* @param array $configuration |
||||||
|
* A configuration array containing information about the plugin instance. |
||||||
|
* @param string $plugin_id |
||||||
|
* The plugin_id for the plugin instance. |
||||||
|
* @param mixed $plugin_definition |
||||||
|
* The plugin implementation definition. |
||||||
|
* @param \Drupal\Core\Session\AccountInterface $account |
||||||
|
* Current user. |
||||||
|
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager |
||||||
|
* Entity type manager. |
||||||
|
* @param \Drupal\islandora\EventGenerator\EventGeneratorInterface $event_generator |
||||||
|
* EventGenerator service to serialize AS2 events. |
||||||
|
* @param \Stomp\StatefulStomp $stomp |
||||||
|
* Stomp client. |
||||||
|
* @param \Drupal\jwt\Authentication\Provider\JwtAuth $auth |
||||||
|
* JWT Auth client. |
||||||
|
* @param \Drupal\islandora\IslandoraUtils $utils |
||||||
|
* Islandora utility functions. |
||||||
|
* @param \Drupal\islandora\MediaSource\MediaSourceService $media_source |
||||||
|
* Media source service. |
||||||
|
* @param \Drupal\token\TokenInterface $token |
||||||
|
* Token service. |
||||||
|
* @param \Drupal\Core\Messenger\MessengerInterface $messenger |
||||||
|
* The messenger. |
||||||
|
* @param \Drupal\Core\Config\ConfigFactoryInterface $config |
||||||
|
* The system file config. |
||||||
|
*/ |
||||||
|
public function __construct( |
||||||
|
array $configuration, |
||||||
|
$plugin_id, |
||||||
|
$plugin_definition, |
||||||
|
AccountInterface $account, |
||||||
|
EntityTypeManagerInterface $entity_type_manager, |
||||||
|
EventGeneratorInterface $event_generator, |
||||||
|
StatefulStomp $stomp, |
||||||
|
JwtAuth $auth, |
||||||
|
IslandoraUtils $utils, |
||||||
|
MediaSourceService $media_source, |
||||||
|
TokenInterface $token, |
||||||
|
MessengerInterface $messenger, |
||||||
|
ConfigFactoryInterface $config |
||||||
|
) { |
||||||
|
$this->utils = $utils; |
||||||
|
$this->mediaSource = $media_source; |
||||||
|
$this->token = $token; |
||||||
|
$this->messenger = $messenger; |
||||||
|
$this->config = $config->get('system.file'); |
||||||
|
parent::__construct( |
||||||
|
$configuration, |
||||||
|
$plugin_id, |
||||||
|
$plugin_definition, |
||||||
|
$account, |
||||||
|
$entity_type_manager, |
||||||
|
$event_generator, |
||||||
|
$stomp, |
||||||
|
$auth, |
||||||
|
$messenger |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* {@inheritdoc} |
||||||
|
*/ |
||||||
|
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) { |
||||||
|
return new static( |
||||||
|
$configuration, |
||||||
|
$plugin_id, |
||||||
|
$plugin_definition, |
||||||
|
$container->get('current_user'), |
||||||
|
$container->get('entity_type.manager'), |
||||||
|
$container->get('islandora.eventgenerator'), |
||||||
|
$container->get('islandora.stomp'), |
||||||
|
$container->get('jwt.authentication.jwt'), |
||||||
|
$container->get('islandora.utils'), |
||||||
|
$container->get('islandora.media_source_service'), |
||||||
|
$container->get('token'), |
||||||
|
$container->get('messenger'), |
||||||
|
$container->get('config.factory') |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
|
} |
Loading…
Reference in new issue