Compare commits
77 Commits
2.x
...
d9_islando
| Author | SHA1 | Date |
|---|---|---|
|
|
f6a6f415d8 | 5 years ago |
|
|
d8e7a2d9e3 | 5 years ago |
|
|
ce14534e22 | 5 years ago |
|
|
433d033f72 | 5 years ago |
|
|
0ce9b3eb20 | 5 years ago |
|
|
51cd810cca | 5 years ago |
|
|
6a311c8b33 | 5 years ago |
|
|
788b57047a | 5 years ago |
|
|
8dc721007c | 5 years ago |
|
|
8606a96662 | 5 years ago |
|
|
3850750055 | 5 years ago |
|
|
33764db9ed | 5 years ago |
|
|
e5c1038eeb | 5 years ago |
|
|
1ab05e79b6 | 5 years ago |
|
|
24ed82c475 | 5 years ago |
|
|
3c3262bd68 | 5 years ago |
|
|
4a8f23d0d6 | 5 years ago |
|
|
985f7789c3 | 5 years ago |
|
|
a5f95057f0 | 5 years ago |
|
|
7a5bcfadb7 | 5 years ago |
|
|
b713f4c996 | 5 years ago |
|
|
843fda996a | 5 years ago |
|
|
50a64ea304 | 5 years ago |
|
|
339391a952 | 5 years ago |
|
|
f547b35c3e | 5 years ago |
|
|
b9adac5c4c | 5 years ago |
|
|
da26e5e5a7 | 5 years ago |
|
|
758fc1d22f | 5 years ago |
|
|
4f8fef8fbe | 5 years ago |
|
|
90b7553fe0 | 5 years ago |
|
|
1d19ca0ae8 | 5 years ago |
|
|
5543731683 | 5 years ago |
|
|
311196bc23 | 5 years ago |
|
|
637ef08981 | 5 years ago |
|
|
354d590615 | 5 years ago |
|
|
1083d928cc | 5 years ago |
|
|
3643ae925e | 5 years ago |
|
|
d4e2c72a39 | 5 years ago |
|
|
36b959a5ec | 5 years ago |
|
|
a7b26a7329 | 5 years ago |
|
|
5d35dba26d | 5 years ago |
|
|
6f51488dbb | 5 years ago |
|
|
697efee3b9 | 5 years ago |
|
|
2dc07e5adc | 5 years ago |
|
|
ec4ee15637 | 5 years ago |
|
|
183b7075b2 | 5 years ago |
|
|
02e2cb22b5 | 5 years ago |
|
|
251f28ca6a | 5 years ago |
|
|
6b409dc6f7 | 5 years ago |
|
|
a4b389b323 | 5 years ago |
|
|
073ec09767 | 5 years ago |
|
|
01fdcfb3ef | 5 years ago |
|
|
fcf78dcfe1 | 5 years ago |
|
|
93bcac2178 | 5 years ago |
|
|
5b08b765cb | 5 years ago |
|
|
3172f9f55f | 5 years ago |
|
|
ec648e6e15 | 5 years ago |
|
|
de4fcbb00c | 5 years ago |
|
|
8ed7611db2 | 5 years ago |
|
|
eecbd83689 | 5 years ago |
|
|
51158aa3ca | 5 years ago |
|
|
0b165a8278 | 5 years ago |
|
|
b2e71084c7 | 5 years ago |
|
|
d4a51bebe2 | 5 years ago |
|
|
1ed788a6e8 | 5 years ago |
|
|
bb09637449 | 5 years ago |
|
|
94c1931382 | 5 years ago |
|
|
1e3dbaeef3 | 5 years ago |
|
|
3bb741f9d7 | 5 years ago |
|
|
96b496a360 | 5 years ago |
|
|
bba922f637 | 5 years ago |
|
|
56ae235f51 | 5 years ago |
|
|
2b726b9446 | 5 years ago |
|
|
406a75d4a9 | 5 years ago |
|
|
3b23a864fd | 5 years ago |
|
|
8eb7deec4c | 5 years ago |
|
|
c44b957eae | 5 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