original_string: private function getRelatedContentItems(array $relatedContentIds, array $contentTypeIdentifiers)
      {
          if (count($relatedContentIds) === 0) {
              return [];
          }
  
          $criteria = new ContentId($relatedContentIds);
  
          if (!empty($contentTypeIdentifiers)) {
              $criteria = new LogicalAnd([
                  $criteria,
                  new ContentTypeIdentifier($contentTypeIdentifiers),
              ]);
          }
  
          $query = new Query([
              'filter' => $criteria,
              'limit' => count($relatedContentIds),
          ]);
  
          $searchResult = $this->site->getFilterService()->filterContent($query);
          /** @var \eZ\Publish\API\Repository\Values\Content\Content[] $contentItems */
          $contentItems = $this->extractValueObjects($searchResult);
  
          return $contentItems;
      }
code: private function getRelatedContentItems(array $relatedContentIds, array $contentTypeIdentifiers)
      {
          if (count($relatedContentIds) === 0) {
              return [];
          }
  
          $criteria = new ContentId($relatedContentIds);
  
          if (!empty($contentTypeIdentifiers)) {
              $criteria = new LogicalAnd([
                  $criteria,
                  new ContentTypeIdentifier($contentTypeIdentifiers),
              ]);
          }
  
          $query = new Query([
              'filter' => $criteria,
              'limit' => count($relatedContentIds),
          ]);
  
          $searchResult = $this->site->getFilterService()->filterContent($query);
          /** @var \eZ\Publish\API\Repository\Values\Content\Content[] $contentItems */
          $contentItems = $this->extractValueObjects($searchResult);
  
          return $contentItems;
      }
code_tokens: private function getRelatedContentItems ( array $ relatedContentIds , array $ contentTypeIdentifiers ) { if ( count ( $ relatedContentIds ) === 0 ) { return [ ] ; } $ criteria = new ContentId ( $ relatedContentIds ) ; if ( ! empty ( $ contentTypeIdentifiers ) ) { $ criteria = new LogicalAnd ( [ $ criteria , new ContentTypeIdentifier ( $ contentTypeIdentifiers ) , ] ) ; } $ query = new Query ( [ 'filter' => $ criteria , 'limit' => count ( $ relatedContentIds ) , ] ) ; $ searchResult = $ this -> site -> getFilterService ( ) -> filterContent ( $ query ) ; /** @var \eZ\Publish\API\Repository\Values\Content\Content[] $contentItems */ $ contentItems = $ this -> extractValueObjects ( $ searchResult ) ; return $ contentItems ; }
docstring: Return an array of related Content from the given arguments.
  
  @throws \InvalidArgumentException As thrown by the Search API
  
  @param array $relatedContentIds
  @param array $contentTypeIdentifiers
  
  @return \eZ\Publish\API\Repository\Values\Content\Content[]
docstring_tokens: Return an array of related Content from the given arguments .