Pages::setScope($scope)

Version 3.8

Set the scoop 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.

Return value

$this

Arguments

$scope
Value: 'global' or 'user'. Default: user.

Full documentation

Get all orders that are delivered:

$Orders = $this->get('pages','order')
   ->setScope('global')
   ->addWhere('status','Delivered');