public function BrightcoveVideo::getRelatedLink in Brightcove Video Connect 8
Same name and namespace in other branches
- 8.2 src/Entity/BrightcoveVideo.php \Drupal\brightcove\Entity\BrightcoveVideo::getRelatedLink()
- 3.x src/Entity/BrightcoveVideo.php \Drupal\brightcove\Entity\BrightcoveVideo::getRelatedLink()
Returns the video's related link.
Return value
array An array list of links.
Overrides BrightcoveVideoInterface::getRelatedLink
1 call to BrightcoveVideo::getRelatedLink()
- BrightcoveVideo::save in src/
Entity/ BrightcoveVideo.php
File
- src/
Entity/ BrightcoveVideo.php, line 323
Class
- BrightcoveVideo
- Defines the Brightcove Video entity.
Namespace
Drupal\brightcove\EntityCode
public function getRelatedLink() {
$value = $this
->get('related_link')
->getValue();
if (empty($value[0])) {
return [];
}
// Original entity missing this array value, so to be consistent when
// comparing the original entity with new entity values add this array
// value if missing.
if (!isset($value[0]['attributes'])) {
$value[0]['attributes'] = [];
}
return $value[0];
}