Page Utility

Doing Page (and Pagetree) related stuff.

class PageUtility
Fully qualified name
\Jar\Utilities\Utilities\PageUtility

getPidsRecursive ( $pids, $level = 3)

Returns all Sub-Pids of certain PIDs.

param string $pids

The starting PID.

param int $level

Depth of the traversing levels.

Example:

My little sweet page tree

|

var_dump(PageUtility::getPidsRecursive(1));
// ['1','2', '3', '7', '8', '4', '5', '9', '10', '6']

var_dump(PageUtility::getPidsRecursive(1, 1));
// ['1','2', '3', '4', '5', '6']
Copied!
Returns

List of matching PIDs.


getPageFieldSlided ( $fieldname)

Slides up a the Pagetree (starting from the current page) and return the nearest filled value of the field.

param string $fieldname

Name of the field/column.

Returns

Value of the field when found, otherwise "null".