comments / notifications : improve abstraction
This commit is contained in:
parent
f467012241
commit
32c026acfe
11 changed files with 92 additions and 65 deletions
|
|
@ -28,6 +28,7 @@ class ProjectPage extends Page {
|
|||
return [
|
||||
'label' => $child->title()->value(),
|
||||
'id' => $child->stepName()->value(),
|
||||
'slug' => $child->slug(),
|
||||
'index' => intval($child->stepIndex()->value()),
|
||||
'modified' => $child->modified('Y-MM-dd'),
|
||||
'uri' => $uri,
|
||||
|
|
@ -44,13 +45,13 @@ class ProjectPage extends Page {
|
|||
}
|
||||
|
||||
if ($child->pdf()->isNotEmpty()) {
|
||||
$uri = $child->parent()->uri() . '?dialog=' . $child->stepName()->value();
|
||||
$uri = $child->parent()->uri() . '?dialog=' . $child->slug();
|
||||
$files[] = getFileData($child->pdf()->toFile());
|
||||
}
|
||||
}
|
||||
|
||||
private function handleVirtualSampleStep($child, &$files, &$uri) {
|
||||
$uri = $child->parent()->uri() . '?dialog=' . $child->stepName()->value();
|
||||
$uri = $child->parent()->uri() . '?dialog=' . $child->slug();
|
||||
foreach ($child->views()->toFiles() as $file) {
|
||||
$files[] = getFileData($file);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue