mediaSource = $media_source; } /** * {@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.media_source_service'), $container->get('messenger') ); } /** * {@inheritdoc} */ protected function generateData(EntityInterface $entity) { $data = parent::generateData($entity); $data['source_field'] = $this->mediaSource->getSourceFieldName($entity->bundle()); return $data; } }