23 lines
No EOL
508 B
PHP
23 lines
No EOL
508 B
PHP
<?php
|
|
|
|
class ProjectPage extends Page {
|
|
public function getSteps() {
|
|
$steps = [];
|
|
|
|
foreach ($this->children() as $child) {
|
|
$steps[] = [
|
|
'text' => $child->title()->value(),
|
|
'value' => $child->stepName()->value(),
|
|
'index' => $child->stepIndex()->value(),
|
|
'modified' => $child->modified('Y-MM-dd'),
|
|
'uri' => $child->uri()
|
|
];
|
|
}
|
|
|
|
usort($steps, function ($a, $b) {
|
|
return $a['index'] <=> $b['index'];
|
|
});
|
|
|
|
return $steps;
|
|
}
|
|
} |