protected function prepareTerms(array $values) {
    $terms = [];

    foreach ($values as $uuid) {
      $term = $this->termStorage->loadByProperties([
        'uuid' => $uuid,
      ]);
      $term = reset($term);

      if (!empty($term)) {
        $terms[] = [
          'target_id' => $term->id(),
        ];
      }
    }

    return $terms;
  }
protected function prepareTerms(array $values) {
    $terms = [];

    foreach ($values as $uuid) {
      $term = $this->termStorage->loadByProperties([
        'uuid' => $uuid,
      ]);
      $term = reset($term);

      if (!empty($term)) {
        $terms[] = [
          'target_id' => $term->id(),
        ];
      }
    }

    return $terms;
  }
protected function prepareTerms ( array $ values ) { $ terms = [ ] ; foreach ( $ values as $ uuid ) { $ term = $ this -> termStorage -> loadByProperties ( [ 'uuid' => $ uuid , ] ) ; $ term = reset ( $ term ) ; if ( ! empty ( $ term ) ) { $ terms [ ] = [ 'target_id' => $ term -> id ( ) , ] ; } } return $ terms ; }
Returns taxonomy terms for UUIDs.

@param array $values
A list of UUIDs for terms.

@return array
Returns an empty array or one filled with taxonomy terms.
Returns taxonomy terms for UUIDs .