You are here

protected function TaxonomyTermMatch::getVocabularyName in Acquia Content Hub 8.2

Extracts vocabulary name from CDF object.

Parameters

\Acquia\ContentHubClient\CDF\CDFObject $cdf_object: CDF object.

Return value

string|null Vocabulary machine name.

1 call to TaxonomyTermMatch::getVocabularyName()
TaxonomyTermMatch::onLoadLocalEntity in modules/acquia_contenthub_subscriber/src/EventSubscriber/LoadLocalEntity/TaxonomyTermMatch.php
Load local terms with the same name, vocabulary and relative parent.

File

modules/acquia_contenthub_subscriber/src/EventSubscriber/LoadLocalEntity/TaxonomyTermMatch.php, line 112

Class

TaxonomyTermMatch
Class TaxonomyTermMatch.

Namespace

Drupal\acquia_contenthub_subscriber\EventSubscriber\LoadLocalEntity

Code

protected function getVocabularyName(CDFObject $cdf_object) : ?string {
  $bundle = $cdf_object
    ->getAttribute('bundle')
    ->getValue();
  return $bundle[CDFObject::LANGUAGE_UNDETERMINED] ?? NULL;
}