Problem/Motivation
I have attempted to change the displayed items per page in a view (set in the UI to 10) by using$view->pager->setItemsPerPage(5)
and alternatively $view->pager->setItemsPerPage('5')
I have tried this in hook_views_pre_render and hook_views_pre_execute, both of which have the pager populated and reporting 10 before and 5 after the set, using $view->pager->getItemsPerPage(). Other hooks are too early in the flow and have a null pager value.
The amount of records displayed continues to be 10.