/** * Gets the result from the query * @param \ride\web\cms\orm\ContentProperties $properties * @param \ride\library\orm\query\ModelQuery $query * @return array Array with Content objects */ protected function getResult(ContentProperties $contentProperties, ContentService $contentService, ModelQuery $query) { $entry = $query->queryFirst(); if (!$entry) { return $entry; } $node = $this->properties->getNode(); $titleFormat = $contentProperties->getContentTitleFormat(); $teaserFormat = $contentProperties->getContentTeaserFormat(); $imageFormat = $contentProperties->getContentImageFormat(); $dateFormat = $contentProperties->getContentDateFormat(); return $contentService->getContentForEntry($this->model, $entry, $node->getRootNodeId(), $this->locale, null, $titleFormat, $teaserFormat, $imageFormat, $dateFormat); }