<?php

return [
    "type"           => "article",
    "model"          => App\Models\Article::class,
    "label"          => "content_types.article_plural",
    "label_singular" => "content_types.article_singular",
    "hierarchic"     => FALSE,
    "group"          => "content",
    "isPage"         => TRUE,
    "baseUri"        => [
        'en'         => '/articles',
        'de'         => '/emagazin'
    ],
    "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"          => "author",
            "label"         => "Author",
            "type"          => "textBox",
            "maxLength"     => 255,
            "multiLanguage" => FALSE,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation"    => "required|max:255",
        ],
        [
            "name"          => "reading_time",
            "label"         => "Reading Time",
            "type"          => "textBox",
            "multiLanguage" => FALSE,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation"    => "nullable|max:150",
        ],
        [
            "name"          => "published_date",
            "label"         => "Publication Date",
            "type"          => "datePicker",
            "inputType"     => "date",
            "validation"    => "required",
        ],
        [
            "name"          => "content",
            "label"         => "Content",
            "type"          => "editor",
            "multiLanguage" => TRUE,
            "preValidation" => "trim|xss_clean",
            "validation"    => ""
        ],
        [
            "name"          => "office_info",
            "label"         => "Office Info",
            "type"          => "editor",
            "multiLanguage" => TRUE,
            "preValidation" => "trim|xss_clean",
            "validation"    => ""
        ],
        [
            "name"          => "title_image_text_block",
            "label"         => "Title Image Text Block",
            "type"          => "textBox",
            "maxLength"     => 255,
            "multiLanguage" => TRUE,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation"    => "",
        ],
        [
            "name"          => "content_image_text_block",
            "label"         => "Content Image Text Block",
            "type"          => "editor",
            "multiLanguage" => TRUE,
            "preValidation" => "trim|xss_clean",
            "validation"    => ""
        ],
        [
            "name"          => "imageTextBlock",
            "label"         => "Image Text Block",
            "type"          => "mediaPicker",
            "multiple"      => FALSE,
            "mediaType"     => "image",
        ],
        [
            "name"          => "label_magazine_block",
            "label"         => "Label Magazine Block",
            "type"          => "textBox",
            "maxLength"     => 255,
            "multiLanguage" => TRUE,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation"    => "",
        ],
        [
            "name"          => "title_magazine_block",
            "label"         => "Title Magazine Block",
            "type"          => "textBox",
            "maxLength"     => 255,
            "multiLanguage" => TRUE,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation"    => "",
        ],
        [
            "name"          => "imageMagazine",
            "label"         => "Image Magazine Block",
            "type"          => "mediaPicker",
            "multiple"      => FALSE,
            "mediaType"     => "image",
        ],
        [
            "name"        => "relatedArticles",
            "label"       => "Related Articles",
            "type"        => "multiplePicker",
            "allowInsert" => FALSE,
            "objectTypes" => ["article"],
            "order"       => TRUE,
            "maxSize"     => 3,
        ],
        [
            "name"      => "featuredImage",
            "label"     => "Featured Image",
            "type"      => "mediaPicker",
            "multiple"  => FALSE,
            "mediaType" => "image",
            "minSize"   => 1,
        ],
    ],
    "actions"        => [
        "insert", "edit", "delete"
    ]
];
