Views: 2290
Last Modified: 30.03.2022

Restoring collection from completed data operates the same as described in the Objects:

// restoring by primary key
$books = \Bitrix\Main\Test\Typography\Books::wakeUp([1, 2]);

// restoring by set of fields
$books = \Bitrix\Main\Test\Typography\Books::wakeUp([
	['ID' => 1, 'TITLE' => 'Title 1'],
	['ID' => 2, 'TITLE' => 'Title 2']
]);

With the difference that array with object data is passed to be placed in the collection.





Courses developed by Bitrix24