public function findByIds(array $ids);
/** * {@inheritdoc} */ public function read(NodeInterface $node, PropertyInterface $property, $webspaceKey, $languageCode, $segmentKey) { $data = []; $categoryIds = $node->getPropertyValueWithDefault($property->getName(), []); $categories = $this->categoryManager->findByIds($categoryIds); $categories = $this->categoryManager->getApiObjects($categories, $languageCode); foreach ($categories as $category) { $data[] = $category->toArray(); } $this->setData($data, $property); }