getNodesByIds() публичный Метод

returns list of nodes with given ids.
public getNodesByIds ( array $ids, string $webspaceKey, string $languageCode ) : array
$ids array
$webspaceKey string
$languageCode string
Результат array
Пример #1
0
 public function testGetByIdsNotExisitingID()
 {
     $data = $this->prepareGetTestData();
     $result = $this->nodeRepository->getNodesByIds([], 'sulu_io', 'en');
     $this->assertEquals(0, sizeof($result['_embedded']['nodes']));
     $this->assertEquals(0, $result['total']);
     $result = $this->nodeRepository->getNodesByIds([$data->getUuid(), '556ce63c-97a3-4a03-81a9-719bc01234e6'], 'sulu_io', 'en');
     $this->assertEquals(1, sizeof($result['_embedded']['nodes']));
     $this->assertEquals(1, $result['total']);
     $this->assertEquals('Testtitle', $result['_embedded']['nodes'][0]['title']);
     $this->assertEquals('/testtitle', $result['_embedded']['nodes'][0]['path']);
 }