Loading brightcove.module +2 −1 Changes for brightcove.module: 2 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -5,6 +5,7 @@ */ use Drupal\brightcove\Entity\BrightcoveSubscription; use Drupal\brightcove\Entity\BrightcoveVideo; use Drupal\Core\Access\AccessResult; use Drupal\Core\Entity\Display\EntityViewDisplayInterface; use Drupal\Core\Entity\EntityInterface; Loading Loading @@ -300,7 +301,7 @@ function brightcove_theme($existing, $type, $theme, $path) { */ function brightcove_entity_access(EntityInterface $entity, $operation, AccountInterface $account) { // Disable editing/deleting video tags. if (($entity instanceof TermInterface && $entity->getVocabularyId() == 'brightcove_video_tags' || $entity instanceof VocabularyInterface && $entity->id() == 'brightcove_video_tags') && ($operation == 'update' || $operation == 'delete')) { if (($entity instanceof TermInterface && $entity->getVocabularyId() == BrightcoveVideo::TAGS_VID || $entity instanceof VocabularyInterface && $entity->id() == BrightcoveVideo::TAGS_VID) && ($operation == 'update' || $operation == 'delete')) { return AccessResult::forbidden(); } return AccessResult::neutral(); Loading src/BrightcoveUtil.php +2 −1 Changes for src/BrightcoveUtil.php: 2 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -336,6 +336,7 @@ class BrightcoveUtil { $entity_tags = array_keys($entity_tags); foreach ($new_tags as $tag) { $existing_tags = \Drupal::entityQuery('taxonomy_term') ->condition('vid', BrightcoveVideo::TAGS_VID) ->condition('name', $tag) ->execute(); Loading @@ -343,7 +344,7 @@ class BrightcoveUtil { if (empty($existing_tags)) { $values = [ 'name' => $tag, 'vid' => 'brightcove_video_tags', 'vid' => BrightcoveVideo::TAGS_VID, 'brightcove_api_client' => [ 'target_id' => $api_client_id, ], Loading src/BrightcoveVideoInterface.php +5 Changes for src/BrightcoveVideoInterface.php: 5 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -48,6 +48,11 @@ interface BrightcoveVideoInterface { */ const STATE_INACTIVE = 'INACTIVE'; /** * Brightcove video tags vocabulary ID. */ const TAGS_VID = 'brightcove_video_tags'; /** * Helper function to save the image for the entity. * Loading src/Entity/BrightcovePlaylist.php +1 −1 Changes for src/Entity/BrightcovePlaylist.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -568,7 +568,7 @@ class BrightcovePlaylist extends BrightcoveVideoPlaylistCMSEntity implements Bri ->setSettings([ 'target_type' => 'taxonomy_term', 'handler_settings' => [ 'target_bundles' => ['brightcove_video_tags' => 'brightcove_video_tags'], 'target_bundles' => [BrightcoveVideo::TAGS_VID => BrightcoveVideo::TAGS_VID], 'auto_create' => TRUE, ], ]) Loading src/Entity/BrightcoveVideo.php +1 −1 Changes for src/Entity/BrightcoveVideo.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -1148,7 +1148,7 @@ class BrightcoveVideo extends BrightcoveVideoPlaylistCMSEntity implements Bright ->setSettings([ 'target_type' => 'taxonomy_term', 'handler_settings' => [ 'target_bundles' => ['brightcove_video_tags' => 'brightcove_video_tags'], 'target_bundles' => [self::TAGS_VID => self::TAGS_VID], 'auto_create' => TRUE, ], ]) Loading Loading
brightcove.module +2 −1 Changes for brightcove.module: 2 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -5,6 +5,7 @@ */ use Drupal\brightcove\Entity\BrightcoveSubscription; use Drupal\brightcove\Entity\BrightcoveVideo; use Drupal\Core\Access\AccessResult; use Drupal\Core\Entity\Display\EntityViewDisplayInterface; use Drupal\Core\Entity\EntityInterface; Loading Loading @@ -300,7 +301,7 @@ function brightcove_theme($existing, $type, $theme, $path) { */ function brightcove_entity_access(EntityInterface $entity, $operation, AccountInterface $account) { // Disable editing/deleting video tags. if (($entity instanceof TermInterface && $entity->getVocabularyId() == 'brightcove_video_tags' || $entity instanceof VocabularyInterface && $entity->id() == 'brightcove_video_tags') && ($operation == 'update' || $operation == 'delete')) { if (($entity instanceof TermInterface && $entity->getVocabularyId() == BrightcoveVideo::TAGS_VID || $entity instanceof VocabularyInterface && $entity->id() == BrightcoveVideo::TAGS_VID) && ($operation == 'update' || $operation == 'delete')) { return AccessResult::forbidden(); } return AccessResult::neutral(); Loading
src/BrightcoveUtil.php +2 −1 Changes for src/BrightcoveUtil.php: 2 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -336,6 +336,7 @@ class BrightcoveUtil { $entity_tags = array_keys($entity_tags); foreach ($new_tags as $tag) { $existing_tags = \Drupal::entityQuery('taxonomy_term') ->condition('vid', BrightcoveVideo::TAGS_VID) ->condition('name', $tag) ->execute(); Loading @@ -343,7 +344,7 @@ class BrightcoveUtil { if (empty($existing_tags)) { $values = [ 'name' => $tag, 'vid' => 'brightcove_video_tags', 'vid' => BrightcoveVideo::TAGS_VID, 'brightcove_api_client' => [ 'target_id' => $api_client_id, ], Loading
src/BrightcoveVideoInterface.php +5 Changes for src/BrightcoveVideoInterface.php: 5 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -48,6 +48,11 @@ interface BrightcoveVideoInterface { */ const STATE_INACTIVE = 'INACTIVE'; /** * Brightcove video tags vocabulary ID. */ const TAGS_VID = 'brightcove_video_tags'; /** * Helper function to save the image for the entity. * Loading
src/Entity/BrightcovePlaylist.php +1 −1 Changes for src/Entity/BrightcovePlaylist.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -568,7 +568,7 @@ class BrightcovePlaylist extends BrightcoveVideoPlaylistCMSEntity implements Bri ->setSettings([ 'target_type' => 'taxonomy_term', 'handler_settings' => [ 'target_bundles' => ['brightcove_video_tags' => 'brightcove_video_tags'], 'target_bundles' => [BrightcoveVideo::TAGS_VID => BrightcoveVideo::TAGS_VID], 'auto_create' => TRUE, ], ]) Loading
src/Entity/BrightcoveVideo.php +1 −1 Changes for src/Entity/BrightcoveVideo.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -1148,7 +1148,7 @@ class BrightcoveVideo extends BrightcoveVideoPlaylistCMSEntity implements Bright ->setSettings([ 'target_type' => 'taxonomy_term', 'handler_settings' => [ 'target_bundles' => ['brightcove_video_tags' => 'brightcove_video_tags'], 'target_bundles' => [self::TAGS_VID => self::TAGS_VID], 'auto_create' => TRUE, ], ]) Loading