protected function S3FileOriginLocator::getAttributeValue in Acquia Content Hub 8.2
Returns the value of an arbitrary CDF attribute.
Parameters
\Acquia\ContentHubClient\CDF\CDFObjectInterface $object: The object to get the attribute value from.
string $attribute: The attribute to get.
Return value
mixed The value of the attribute.
1 call to S3FileOriginLocator::getAttributeValue()
- S3FileOriginLocator::getRemoteFile in modules/
acquia_contenthub_s3/ src/ S3FileOriginLocator.php - Returns the remote file by the uri if there is one, NULL otherwise.
File
- modules/
acquia_contenthub_s3/ src/ S3FileOriginLocator.php, line 182
Class
- S3FileOriginLocator
- Responsible for locating the s3 source of the given file url.
Namespace
Drupal\acquia_contenthub_s3Code
protected function getAttributeValue(CDFObjectInterface $object, string $attribute) {
$attr = $object
->getAttribute($attribute);
if (!$attr) {
return '';
}
return $attr
->getValue()[LanguageInterface::LANGCODE_NOT_SPECIFIED];
}