<?php

return [
    "type"           => "event",
    "model"          => App\Models\Event::class,
    "label"          => "content_types.event_plural",
    "label_singular" => "content_types.event_singular",
    "hierarchic"     => FALSE,
    "group"          => "content",
    "isPage"         => TRUE,
    "baseUri"        => [
        'en'         => '/events',
        'de'         => '/emagazin/events-termine'
    ],
    "search"         => [
        "title" => "title",
        "fields" => [
            "title",
        ],
        "relations" => [
        ],
    ],
    "fields"         => [
        [
            "name"          => "title",
            "label"         => "Title",
            "type"          => "textBox",
            "maxLength"     => 150,
            "multiLanguage" => TRUE,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation"    => "required|max:150",
            "inList"        => TRUE,
            "search"        => TRUE,
            "sort"          => TRUE
        ],
        /*
        [
            "name"          => "category_id",
            "label"         => "Category",
            "type"          => "selectBox",
            "contentType"   => "category",
            "contentField"  => "title",
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation"    => "required",
        ],
        */
        [
            "name"          => "meta_title",
            "label"         => "Meta Title (SEO)",
            "type"          => "textBox",
            "maxLength"     => 255,
            "multiLanguage" => FALSE,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation"    => "max:255",
            "placement"     => "SEO"
        ],
        [
            "name"          => "meta_description",
            "label"         => "Meta Description (SEO)",
            "type"          => "textArea",
            "multiLanguage" => FALSE,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation"    => "",
            "placement"     => "SEO"
        ],
        [
            "name"          => "date",
            "label"         => "Date From",
            "type"          => "datePicker",
            "inputType"     => "date",
            "validation"    => "required",
        ],
        [
            "name"          => "end_date",
            "label"         => "Date To",
            "type"          => "datePicker",
            "inputType"     => "date",
            "validation"    => "nullable",
        ],
        [
            "name"          => "location",
            "label"         => "Location",
            "type"          => "textBox",
            "maxLength"     => 255,
            "multiLanguage" => FALSE,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation"    => "max:255"
        ],
        [
            "name"          => "content",
            "label"         => "Content",
            "type"          => "editor",
            "multiLanguage" => TRUE,
            "preValidation" => "trim|xss_clean",
            "validation"    => ""
        ],
        [
            "name"      => "featuredImage",
            "label"     => "Featured Image",
            "type"      => "mediaPicker",
            "multiple"  => FALSE,
            "mediaType" => "image",
            "minSize"   => 1,
        ],
        [
            "name" => "eventInformation",
            "label" => "Event Information",
            "type" => "repeater",
            "objectType" => "event_info",
            "order" => true,
        ],
        [
            "name"          => "pavilions_content",
            "label"         => "Pavilions Content",
            "type"          => "editor",
            "multiLanguage" => TRUE,
            "preValidation" => "trim|xss_clean",
            "validation"    => "",
        ],
    ],
    "actions"        => [
        "insert", "edit", "delete"
    ]
];
