Kursangebote mit Anmeldung über getCoursForm(). Funktionen: getCoursList, getCoursContent, getCoursImages, getCoursVideos, getCoursMedia.
Gibt alle Kurse zurück. Optional nach Instructor, Kategorie und Zeitraum filtern.
Code
$config = [];
$config["status"] = '1';
$config["website"] = '1';
$config["instructor"] = ''; // optional: Instructor-ID
$config["period"] = 'future'; // 'future', 'past', leer = alle
$config["categorie"] = ''; // optional: Kategorie-ID
$config["limit"] = '10';
$config["start"] = '0';
$config["orderby"] = 'date';
$config["direction"] = 'asc';
$config["search"] = '';
$kurse = getCoursList($config, "false");
foreach ($kurse as $kurs) {
echo $kurs["headline"]; // Kurstitel
echo $kurs["start"]; // Startdatum (Unix-Timestamp)
echo $kurs["end"]; // Enddatum
echo $kurs["price"]; // Preis
echo $kurs["image"]["image"]; // Hauptbild
}$config Parameter
| Key | Beschreibung | Beispiel |
|---|---|---|
| status | 1 = aktiv, 0 = inaktiv | '1' |
| website | Website-ID | '1' |
| instructor | Filter nach Instructor-ID | '1033' |
| period | future = zukünftig · past = vergangen · leer = alle | 'future' |
| categorie | Filter nach Kategorie-ID | '5' |
| limit / start | Pagination | '10' / '0' |
| orderby / direction | Sortierung: id, date, headline | 'date' / 'asc' |
| search | Freitextsuche | '' |
Rückgabe-Keys
| Key | Beschreibung |
|---|---|
| id / key / tags / headline / content / description | Basisdaten |
| theme | Thema / Kursbereich |
| start / end | Start- und Enddatum (Unix-Timestamp) |
| price | Preis |
| age | Altersangabe |
| highlight | '1' wenn aktives Highlight, sonst nicht gesetzt |
| status / update | Status und letztes Update |
| instructor[].id / .firstname / .lastname / .email | Zugeordnete Instruktoren |
| location.id / .key / .name / .city / .country | Lokal (aus Lokale-Modul, falls verknüpft) |
| location.name / .city / .country | Lokal (Freitext, wenn kein Lokale-Eintrag) |
| links[].referenz / .url / .target / .button | Verknüpfte Links |
| downloads[].id / .button / .referenz / .file / .typ | Downloads |
| image_items / video_items / videofile_items / media_items | Anzahl Medien |
| graphic.image / .thumbnail / .small | Werbegrafik / Flyer (Shortcut) |
| advertising.graphic.image / .thumbnail / .small | Werbegrafik (alternative Struktur) |
| advertising.video.video / .width / .height | Werbevideo |
| image[].image / .thumbnail / .small | Bilder-Galerie |
| video[].embed / .url | Video-Streams |
| videofile[].video / .width / .height | Hochgeladene Videodateien |
Ausgabe (Live)
[
{
"id": "43",
"key": "20280125-2300-Test-Jetz-43",
"tags": "",
"headline": "Test Jetz",
"content": "afd adfasdf adf <\/p>",
"theme": "",
"description": "",
"start": "1832454000",
"end": "1832540400",
"price": "0.00",
"age": "0",
"instructor": [
{
"id": "",
"firstname": "",
"lastname": "",
"email": ""
}
],
"location": {
"name": "",
"city": "",
"country": ""
},
"label": [
"0"
],
"website": [
"1"
],
"status": "1",
"update": "0",
"image_items": 0,
"video_items": 0,
"videofile_items": 0,
"media_items": 0,
"image": [],
"video": [],
"videofile": []
}
]