Browse Source
* update messenger for d9 * fix dependency injection * update info files * stream_for updates for d9 * remove deprecated entity query * replace deprecated functions * use dependency injection for messenger and fix other deprecated functions for d9 * fix deprecations in tests * fix test * phpcs fixes * fix toUrl method * properly use StringTranslationTrait * phpcs fixes and using dependency injection * more deprecations with upgrade_status 3.x version and more phpcs fixes * add defaultTheme per https://www.drupal.org/node/3083055 * replace deprecated context definition method - per https://www.drupal.org/node/2976400 * fix context definitions * remove more deprecations * fix deprecations in tests * codesniffer fixes - dependencies must be prefixed with drupal: and missing variable doc comments * replace more url() -> toUrl() and remove unused variables * more code sniffer fixes * some of these urls are necessary as strings * d9 requires update to flysystem module * update migrate_source_csv * temporarily point crayfish-commons to branch with d9 dependencies * another composer dependency adjustment * point composer to d9 branch of jsonld * remove hook_post_action for d9 * remove hook_post_action as a dependency - this does break multifile media FOR NOW * update migration keys -> ids per https://www.drupal.org/node/3060246 * fix url method * point jsonld back to dev since PR has been merged * wrong branch name * add update hook for change in migration source * update travis.yml for php 7.4 * add doc comment * build on php7.2, 7.3, 7.4 * use this instead of Drupal:: * just php 7.3 and 7.4 * swap back to dev-dev crayfish-commons since PR was merged * perhaps this fixes the config thing * trying to fix config * ugh errant semicolon * missing variable name * maybe it would help if i named the variables consistently * please work... * i can't get the dependency injection of config correct * sad panda * thanks @seth-shaw-unlv for this magical fix * fix dependency injection * putting the config in the AbstractGenerateDerivativeMediaFile class instead * already the system.file config * update test module info file * fix implode ordre of parameters * remove unused use statement * fix geminiclient tests * phpcs fix * check for fedora key in flysystem * check for array not being null * more null checks * try on the downgrade-symfony branch * set fedora url to null if it isn't in the settings * testing the crayfish-commons version fix * fixes for new classes in newer version of guzzlehttp but still needing to support old methods * update phpunit.xml? * transform 1 response from preg_match to a boolean * reorder crayfish-commons version fix * code sniffer fixes * abstract awaying the shared constructor so that phpcpd is happy about less duplicated code * attempt to reduce shared code in the FedoraAdapterTest * remove unused use statement * code sniffer fixes...not sure how i missed these... * remove reliance on branch of crayfish-commons since PR has been mergedpull/791/head
Eli Zoller
4 years ago
committed by
GitHub
82 changed files with 716 additions and 628 deletions
@ -1,5 +1,6 @@
|
||||
services: |
||||
islandora.commands: |
||||
class: \Drupal\islandora\Commands\IslandoraCommands |
||||
arguments: ['@entity_type.manager', '@current_user', '@account_switcher'] |
||||
tags: |
||||
- { 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