CWP\CWP\PageTypes\DatedUpdateHolder::ExtractMonths
Produce an ArrayList of available months out of the updates contained in the DataList.
Here is an example of the returned structure: ArrayList: ArrayData: YearName => 2013 Months => ArrayList: MonthName => Jan MonthNumber => 1 MonthLink => (page URL)year=2012&month=1 Active => true ArrayData: YearName => 2012 Months => ArrayList: ...
Signature
public function ExtractMonths(DataList
$updates,
[string
$link = NULL,
[int
$currentYear = NULL,
[int
$currentMonthNumber = NULL]]] )
Parameters
$updates
— SilverStripe\ORM\DataList- DataList DataList to extract months from.
$link
— string- Link used as abase to construct the MonthLink.
$currentYear
— int- Currently selected year, for computing the link active state.
$currentMonthNumber
— int- Currently selected month, for computing the link active state.