Loading bynder.info.yml +1 −1 Original line number Diff line number Diff line Loading @@ -6,6 +6,6 @@ core_version_requirement: ^8.8 || ^9 configure: bynder.configuration_form dependencies: - drupal:media - drupal:media (>= 8.5) - entity_browser:entity_browser (>= 8.x-2.x) - jquery_ui_tooltip:jquery_ui_tooltip src/Plugin/media/Source/Bynder.php +0 −28 Original line number Diff line number Diff line Loading @@ -408,34 +408,6 @@ class Bynder extends MediaSourceBase { return parent::buildConfigurationForm($form, $form_state); } /** * Get the primary value stored in the source field. * * @todo This helper method was added to MediaSourceBase in 8.5.0 but we * replicate it here because we want to support 8.4.0 sites as well. This * method can be safely removed once there is no need to support 8.4 anymore, * and we ensure the core Media dependency is bumped to 8.5.0 at least. * * @param \Drupal\media\MediaInterface $media * A media item. * * @return mixed * The source value. * * @throws \RuntimeException * If the source field for the media source is not defined. */ public function getSourceFieldValue(MediaInterface $media) { $source_field = $this->configuration['source_field']; if (empty($source_field)) { throw new \RuntimeException('Source field for media source is not defined.'); } /** @var \Drupal\Core\Field\FieldItemInterface $field_item */ $field_item = $media->get($source_field)->first(); return $field_item->{$field_item->mainPropertyName()}; } /** * Creates the metadata field storage definition. * Loading Loading
bynder.info.yml +1 −1 Original line number Diff line number Diff line Loading @@ -6,6 +6,6 @@ core_version_requirement: ^8.8 || ^9 configure: bynder.configuration_form dependencies: - drupal:media - drupal:media (>= 8.5) - entity_browser:entity_browser (>= 8.x-2.x) - jquery_ui_tooltip:jquery_ui_tooltip
src/Plugin/media/Source/Bynder.php +0 −28 Original line number Diff line number Diff line Loading @@ -408,34 +408,6 @@ class Bynder extends MediaSourceBase { return parent::buildConfigurationForm($form, $form_state); } /** * Get the primary value stored in the source field. * * @todo This helper method was added to MediaSourceBase in 8.5.0 but we * replicate it here because we want to support 8.4.0 sites as well. This * method can be safely removed once there is no need to support 8.4 anymore, * and we ensure the core Media dependency is bumped to 8.5.0 at least. * * @param \Drupal\media\MediaInterface $media * A media item. * * @return mixed * The source value. * * @throws \RuntimeException * If the source field for the media source is not defined. */ public function getSourceFieldValue(MediaInterface $media) { $source_field = $this->configuration['source_field']; if (empty($source_field)) { throw new \RuntimeException('Source field for media source is not defined.'); } /** @var \Drupal\Core\Field\FieldItemInterface $field_item */ $field_item = $media->get($source_field)->first(); return $field_item->{$field_item->mainPropertyName()}; } /** * Creates the metadata field storage definition. * Loading