Referring to the 3.0.1 change that meant the old getItems() now only returns 100 items and the replacement is a getAll().
I note from the notes the suggested method is:
$ctx = (new ClientContext($siteUrl))->withCredentials($credentials);
$list = $ctx->getWeb()->getLists()->getByTitle("--large list title--");
$allItems = $list->getItems()->getAll(5000, function ($returnType){
print("{$returnType->getPageInfo()} items loaded...\n");
})->executeQuery();
In the large items example file similar but different code is suggested.
private function getSharePointListByTitle($titleURL)
{
$list = $this->ctx->getWeb()->getLists()->getByTitle($titleURL);
$allItems = $list->getItems()->getAll(5000, function ($returnType){
print("{$returnType->getPageInfo()} items loaded...\n");
})->executeQuery();
return $allItems;
}
But no luck. I can see that 567 items are returned in the sub function and printed to screen, but I can't see how I can extract them to actually use them. Would you expand on the example to explain it please. I'm guesing it is something like another $allItems->getYesReallyGetThemNow(); or something???
Meantime I ended up dropping back to 3.0.0
Thanks heaps
Referring to the 3.0.1 change that meant the old getItems() now only returns 100 items and the replacement is a getAll().
I note from the notes the suggested method is: $ctx = (new ClientContext($siteUrl))->withCredentials($credentials); $list = $ctx->getWeb()->getLists()->getByTitle("--large list title--");
$allItems = $list->getItems()->getAll(5000, function ($returnType){ print("{$returnType->getPageInfo()} items loaded...\n"); })->executeQuery();
In the large items example file similar but different code is suggested.
I replaced my function:
with
But no luck. I can see that 567 items are returned in the sub function and printed to screen, but I can't see how I can extract them to actually use them. Would you expand on the example to explain it please. I'm guesing it is something like another $allItems->getYesReallyGetThemNow(); or something???
Meantime I ended up dropping back to 3.0.0 Thanks heaps