Pages::filter($criteria)
Version 4.1
filter
Version 4.1
filter
Match pages in collection against given search criteria.
Object Pages
Get tasks from the project that are done.
foreach ( $Project->tasks->filter('status=Done') as $Task ){
$txt .= "<p>{$Task->date} {$Task->name}</p>";
}
Filter pages using anonymous function.
$Tasks->filter( function($Task){
return $Task->isGiven('order_date');
} );
// $Tasks now contains only tasks that had a valid order date.