plugin.tx_ajaxmap {
    view {
        templateRootPath = {$plugin.tx_ajaxmap.view.templateRootPath}
        partialRootPath = {$plugin.tx_ajaxmap.view.partialRootPath}
        layoutRootPath = {$plugin.tx_ajaxmap.view.layoutRootPath}
    }

    persistence {
        storagePid = {$plugin.tx_ajaxmap.persistence.storagePid}
    }
}

# ==================================
# Default plugin settings
# ==================================
plugin.tx_ajaxmap.settings {
    # exclude or map fields to other keys for json responses
    # general:
    mapping {
        DWenzel\Ajaxmap\Domain\Model\Map {
            categories.exclude = 1
            pid.exclude = 1
            placeGroups.exclude = 1
        }

        DWenzel\Ajaxmap\Domain\Model\Category {
            pid.exclude = 1
            uid.mapTo = key
        }

        DWenzel\Ajaxmap\Domain\Model\Region {
            uid.mapTo = key
            regions {
                mapTo = children
                maxDept = 5
            }

            pid.exclude = 1
        }

        DWenzel\Ajaxmap\Domain\Model\Place {
            uid.mapTo = key
            description.mapTo = tooltip
            pid.exclude = 1
            info.exclude = 1
        }

        DWenzel\Ajaxmap\Domain\Model\PlaceGroup {
            uid.mapTo = key
            description.mapTo = tooltip
            pid.exclude = 1
        }

        DWenzel\Ajaxmap\Domain\Model\LocationType {
            uid.mapTo = key
            icon.mapTo = markerIcon
            pid.exclude = 1
        }
    }

    # mapping for ajaxListPlaces action
    mapping.listPlaces {
        DWenzel\Ajaxmap\Domain\Model\Category {
            uid.mapTo = key
            pid.exclude = 1
            //title.exclude = 1
            description.exclude = 1
            icon.exclude = 1
            parent.exclude = 1
        }

        DWenzel\Ajaxmap\Domain\Model\Region {
            uid.mapTo = key
            regions {
                maxDept = 1
            }

            pid.exclude = 1
        }

        DWenzel\Ajaxmap\Domain\Model\Place {
            uid.mapTo = key
            description.mapTo = tooltip
            pid.exclude = 1
            info.exclude = 1
            content.exclude = 1
        }

        DWenzel\Ajaxmap\Domain\Model\PlaceGroup {
            uid.mapTo = key
            description.exclude = 1
            pid.exclude = 1
            title.exclude = 1
            parent.exclude = 1
            icon.exclude = 1
        }

        DWenzel\Ajaxmap\Domain\Model\LocationType {
            uid.mapTo = key
            description.exclude = 1
            icon.exclude = 1
            pid.exclude = 1
            title.exclude = 1
        }
    }
}

# ==================================
# Ajax Page Type
# ==================================
ajaxMapPage = PAGE
ajaxMapPage {
    typeNum = 1441916976
    config.disableAllHeaderCode = 1
    config.metaCharset = UTF-8
    config.no_cache = 1
    10 = COA
    10 < tt_content.list.20.ajaxmap_map
}

config.tx_extbase {
    persistence {
        classes {
            DWenzel\Ajaxmap\Domain\Model\Content {
                mapping {
                    tableName = tt_content
                    columns {
                        altText.mapOnProperty = altText
                        titleText.mapOnProperty = titleText
                    }
                }
            }

            DWenzel\Ajaxmap\Domain\Model\Address {
                mapping {
                    tableName = tt_address
                }
            }

            DWenzel\Ajaxmap\Domain\Model\Category {
                mapping {
                    tableName = sys_category
                }
            }
        }
    }
}
