Page::setScope($scope)
Version 3.9
Set the scope for query
Version 3.9
Set the scope for query
As default, Pages will get only pages that users has privileges to. For example: Only workhours where user is employee). This search can be set to global scope, where user privileges are omitted.
This can be used for example in dashboards, where is shown a statistic of all sales, even if normally user can see only part of them.
void
Get all order that has specific order nuMber:
$Order = $this->get('page','order')
->setScope('global')
->addWhere('order_number','=','123456');