Zeige Kurse im Mitgliederbereich und mach hochgeladene Fassungen ansehbar.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
b374335b3a
commit
4f2e5a5f3b
24 files changed
+413
-47
No files matched your search
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http;
|
||||
|
||||
use App\Domain\Catalog\LicenseArticle;
|
||||
|
||||
class CourseOutline
|
||||
{
|
||||
public function title(LicenseArticle $article): string
|
||||
{
|
||||
$release = $article->currentRelease;
|
||||
|
||||
if ($release === null) {
|
||||
return $article->code;
|
||||
}
|
||||
|
||||
$release->loadMissing([
|
||||
'rootCompositionVersion.composition',
|
||||
'rootElementVersion.element',
|
||||
]);
|
||||
|
||||
return $release->rootCompositionVersion?->composition?->designation
|
||||
?? $release->rootElementVersion?->element?->working_title
|
||||
?? $release->classification_note
|
||||
?? $article->code;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user