Browse Source

code sniffer fixes...not sure how i missed these...

d9_islandora
elizoller 4 years ago
parent
commit
d8e7a2d9e3
  1. 204
      src/Plugin/Action/AbstractGenerateDerivativeBase.php

204
src/Plugin/Action/AbstractGenerateDerivativeBase.php

@ -3,12 +3,9 @@
namespace Drupal\islandora\Plugin\Action; namespace Drupal\islandora\Plugin\Action;
use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Messenger\MessengerInterface; use Drupal\Core\Messenger\MessengerInterface;
use Drupal\Core\Session\AccountInterface; use Drupal\Core\Session\AccountInterface;
use Drupal\Core\Url;
use Drupal\islandora\IslandoraUtils; use Drupal\islandora\IslandoraUtils;
use Drupal\islandora\EventGenerator\EmitEvent; use Drupal\islandora\EventGenerator\EmitEvent;
use Drupal\islandora\EventGenerator\EventGeneratorInterface; use Drupal\islandora\EventGenerator\EventGeneratorInterface;
@ -21,75 +18,74 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
/** /**
* A base class for constructor/creator derivative generators. * A base class for constructor/creator derivative generators.
*/ */
class AbstractGenerateDerivativeBase extends EmitEvent class AbstractGenerateDerivativeBase extends EmitEvent {
{
/** /**
* Islandora utility functions. * Islandora utility functions.
* *
* @var \Drupal\islandora\IslandoraUtils * @var \Drupal\islandora\IslandoraUtils
*/ */
protected $utils; protected $utils;
/** /**
* Media source service. * Media source service.
* *
* @var \Drupal\islandora\MediaSource\MediaSourceService * @var \Drupal\islandora\MediaSource\MediaSourceService
*/ */
protected $mediaSource; protected $mediaSource;
/** /**
* Token replacement service. * Token replacement service.
* *
* @var \Drupal\token\TokenInterface * @var \Drupal\token\TokenInterface
*/ */
protected $token; protected $token;
/** /**
* The messenger. * The messenger.
* *
* @var \Drupal\Core\Messenger\MessengerInterface * @var \Drupal\Core\Messenger\MessengerInterface
*/ */
protected $messenger; protected $messenger;
/** /**
* The system file config. * The system file config.
* *
* @var \Drupal\Core\Config\ImmutableConfig * @var \Drupal\Core\Config\ImmutableConfig
*/ */
protected $config; protected $config;
/** /**
* Constructs a EmitEvent action. * Constructs a EmitEvent action.
* *
* @param array $configuration * @param array $configuration
* A configuration array containing information about the plugin instance. * A configuration array containing information about the plugin instance.
* @param string $plugin_id * @param string $plugin_id
* The plugin_id for the plugin instance. * The plugin_id for the plugin instance.
* @param mixed $plugin_definition * @param mixed $plugin_definition
* The plugin implementation definition. * The plugin implementation definition.
* @param \Drupal\Core\Session\AccountInterface $account * @param \Drupal\Core\Session\AccountInterface $account
* Current user. * Current user.
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
* Entity type manager. * Entity type manager.
* @param \Drupal\islandora\EventGenerator\EventGeneratorInterface $event_generator * @param \Drupal\islandora\EventGenerator\EventGeneratorInterface $event_generator
* EventGenerator service to serialize AS2 events. * EventGenerator service to serialize AS2 events.
* @param \Stomp\StatefulStomp $stomp * @param \Stomp\StatefulStomp $stomp
* Stomp client. * Stomp client.
* @param \Drupal\jwt\Authentication\Provider\JwtAuth $auth * @param \Drupal\jwt\Authentication\Provider\JwtAuth $auth
* JWT Auth client. * JWT Auth client.
* @param \Drupal\islandora\IslandoraUtils $utils * @param \Drupal\islandora\IslandoraUtils $utils
* Islandora utility functions. * Islandora utility functions.
* @param \Drupal\islandora\MediaSource\MediaSourceService $media_source * @param \Drupal\islandora\MediaSource\MediaSourceService $media_source
* Media source service. * Media source service.
* @param \Drupal\token\TokenInterface $token * @param \Drupal\token\TokenInterface $token
* Token service. * Token service.
* @param \Drupal\Core\Messenger\MessengerInterface $messenger * @param \Drupal\Core\Messenger\MessengerInterface $messenger
* The messenger. * The messenger.
* @param \Drupal\Core\Config\ConfigFactoryInterface $config * @param \Drupal\Core\Config\ConfigFactoryInterface $config
* The system file config. * The system file config.
*/ */
public function __construct( public function __construct(
array $configuration, array $configuration,
$plugin_id, $plugin_id,
$plugin_definition, $plugin_definition,
@ -104,43 +100,43 @@ class AbstractGenerateDerivativeBase extends EmitEvent
MessengerInterface $messenger, MessengerInterface $messenger,
ConfigFactoryInterface $config ConfigFactoryInterface $config
) { ) {
$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');
parent::__construct( parent::__construct(
$configuration, $configuration,
$plugin_id, $plugin_id,
$plugin_definition, $plugin_definition,
$account, $account,
$entity_type_manager, $entity_type_manager,
$event_generator, $event_generator,
$stomp, $stomp,
$auth, $auth,
$messenger $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')
);
}
/**
* {@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…
Cancel
Save