config.tx_extbase {
	persistence {
		classes {
			DWenzel\T3events\Domain\Model\Event {
				subclasses {
					Tx_T3eventsCourse_Course = CPSIT\T3eventsCourse\Domain\Model\Course
				}
			}
			CPSIT\T3eventsCourse\Domain\Model\Course {
				mapping {
					tableName = tx_t3events_domain_model_event
					recordType = Tx_T3eventsCourse_Course

					columns {
						tx_extbase_type.mapTo = extbaseType
					}
				}
			}
			DWenzel\T3events\Domain\Model\Performance {
				subclasses {
					Tx_T3eventsCourse_Schedule = CPSIT\T3eventsCourse\Domain\Model\Schedule
				}
			}
			CPSIT\T3eventsCourse\Domain\Model\Schedule {
				mapping {
					tableName = tx_t3events_domain_model_performance
					recordType = Tx_T3eventsCourse_Schedule
				}
			}

		}
	}
}

# Module configuration

module.tx_t3eventscourse {
	persistence {
		storagePid = {$module.tx_t3eventscourse.persistence.storagePid}
	}

	view {
		templateRootPaths.0 = {$module.tx_t3eventscourse.view.templateRootPaths.0}
		partialRootPaths {
            0 = {$module.tx_t3eventscourse.view.partialRootPaths.0}
            10 = {$module.tx_t3eventscourse.view.partialRootPaths.10}
        }
		layoutRootPaths.0 = {$module.tx_t3eventscourse.view.layoutRootPaths.0}
	}

	settings {
		courseBackend {
            storagePid = {$module.tx_t3eventscourse.settings.courseBackend.storagePid}
			list {
				maxItems = {$module.tx_t3eventscourse.settings.courseBackend.list.maxItems}
				filter {
					genre =
					audience =
					venue =
					eventType =
					periods = futureOnly,pastOnly,all
				}
                paginate {
                    itemsPerPage = 25
                    insertBelow = 0
                    insertAbove = 1
                }
            }
			search {
                fields = headline,subtitle
                showSubjectField = 1
            }
		}
		scheduleBackend {
            storagePid = {$module.tx_t3eventscourse.settings.scheduleBackend.storagePid}
            list {
				maxItems = {$module.tx_t3eventscourse.settings.scheduleBackend.list.maxItems}
				period = all
                filter {
                    genre =
                    audience =
                    venue =
                    eventType =
                    periods = futureOnly,pastOnly,all
                }
                paginate {
                    itemsPerPage = 25
                    insertBelow = 0
                    insertAbove = 1
                }
                # legacy sorting
                sortBy = date
                sortDirection = asc
				# todo read order
                # order = date|asc
			}
		}

		bookings {
			list {
				maxItems = {$module.tx_t3eventscourse.settings.bookings.list.maxItems}
				period = futureOnly
				order = lesson.date|asc,lesson.uid|desc
			}

			cancel {
				byDakosy {
					confirm {
						sendNotification = 1
						fromEmail = {$plugin.tx_t3eventscourse.settings.reservation.default.fromEmail}
						subject = DAKOSY - Ihr Schulungstermin wurde abgesagt
						templateFileName = ByDakosy
					}
				}

				withCosts {
					confirm {
						sendNotification = 1
						fromEmail = {$plugin.tx_t3eventscourse.settings.reservation.default.fromEmail}
						subject = DAKOSY - Reservierung kostenpflichtig storniert
						templateFileName = WithCosts
					}
				}

				noCharge {
					confirm {
						sendNotification = 1
						fromEmail = {$plugin.tx_t3eventscourse.settings.reservation.default.fromEmail}
						subject = DAKOSY - Reservierung kostenfrei storniert
						templateFileName = NoCharge
					}
				}
			}

			removeParticipant {
				byDakosy {
					confirm {
						sendNotification = 1
						fromEmail = {$plugin.tx_t3eventscourse.settings.reservation.default.fromEmail}
						subject = DAKOSY - Reservierung für einen Teilnehmer durch DAKOSY storniert
						templateFileName = ByDakosy
					}
				}

				withCosts {
					confirm {
						sendNotification = 1
						fromEmail = {$plugin.tx_t3eventscourse.settings.reservation.default.fromEmail}
						subject = DAKOSY - Reservierung für einen Teilnehmer kostenpflichtig storniert
						templateFileName = WithCosts
					}
				}

				noCharge {
					confirm {
						sendNotification = 1
						fromEmail = {$plugin.tx_t3eventscourse.settings.reservation.default.fromEmail}
						subject = DAKOSY - Reservierung für einen Teilnehmer kostenfrei storniert
						templateFileName = NoCharge
					}
				}
			}

			notify {
				fromEmail = {$plugin.tx_t3eventscourse.settings.reservation.default.fromEmail}
			}
		}
	}
}

lib.compatVersion76 = TEXT
lib.compatVersion76.value = false
[compatVersion = 7.6.0]
	lib.compatVersion76.value = true
[global]



