ajout d'une fonction pour faire dans l'autre sens : avoir toute les date (parent et linked) + implémentation de la fonction
This commit is contained in:
parent
7501e2cbb7
commit
9789b645ff
7 changed files with 43 additions and 12 deletions
|
|
@ -1,5 +1,17 @@
|
|||
<?php
|
||||
|
||||
|
||||
function allYears ($article) {
|
||||
$years = new Pages([$article->parent()]);
|
||||
|
||||
foreach (site()->find('textes')->children() as $year) {
|
||||
if ($year->linkedTexts()->toPages()->has($article)) {
|
||||
$years = $years->add($year);
|
||||
}
|
||||
}
|
||||
return $years;
|
||||
}
|
||||
|
||||
function setTitleFontSizeClass($title, $level = 'h1')
|
||||
{
|
||||
$length = strlen($title);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue