Speichern und Laden von Inhalten verbessert
This commit is contained in:
committed by
Eric Blommel
parent
42132bbbe6
commit
fd1bc5812a
@@ -41,7 +41,7 @@ class SubjectData
|
||||
public array $topics;
|
||||
|
||||
/**
|
||||
* Erstellt ein neues Fach
|
||||
* Erstellt ein neues Fach. Es wird noch nichts gespeichert!
|
||||
* @param string $id Ein eindeutiger Bezeichner für das Fach, darf nur A-Z, a-Z, 0-9 sowie _ und - enthalten
|
||||
* @param string $displayName Der für User angezeigte Name des Faches, nur reiner Text
|
||||
* @param string $description Eine kurze Beschreibung des Faches, z.B. für den Text auf der Startseite, kann HTML enthalten
|
||||
@@ -72,17 +72,12 @@ class SubjectData
|
||||
|
||||
$result->topics = $topics;
|
||||
|
||||
if(!$result->save()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prüft, ob das Thema zu den angegebenen IDs existiert
|
||||
* @param string $subjectId ID des Faches
|
||||
* @param string $topicId ID des Themas
|
||||
* @return bool true, wenn es existiert, sonst false
|
||||
*/
|
||||
public static function exists(string $subjectId): bool
|
||||
|
||||
Reference in New Issue
Block a user