<?php

    return [
        "type"           => "publication",
        "model"          => App\Models\Publication::class,
        "label"          => "publications",
        "label_singular" => "publication",
        "template"       => FALSE,
        "hierarchic"     => FALSE,
        "group"          => "community",
        "order"          => TRUE,
        "showSlug"       => TRUE,
        "showUri"        => FALSE,
        
        "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"          => "block_title",
                "label"         => "Frontend title",
                "type"          => "link",
                "maxLabel"     => 300,
                "multiLanguage" => true,
                "objectTypes"   => [
                    "page", "product"
                ],
                "required"      => false,
            ],
            [
                "name"          => "authors",
                "label"         => "authors",
                "type"          => "textBox",
                "maxLength"     => 300,
                "multiLanguage" => TRUE,
                "preValidation" => "strip_tags|xss_clean|trim",
                "validation"    => "required|max:300",
                "inList"        => TRUE,
                "search"        => TRUE,
                "sort"          => TRUE
            ],
            [
                "name"          => "reference",
                "label"         => "reference",
                "type"          => "textBox",
                "maxLength"     => 300,
                "multiLanguage" => TRUE,
                "preValidation" => "strip_tags|xss_clean|trim",
                "validation"    => "required|max:300",
            ],
            [
                "name"          => "publication_date",
                "label"         => "Publication date",
                "type"          => "datePicker",
                "inputType"     => "date",
                "validation"    => "required",
                "inList"        => TRUE,
                "search"        => TRUE,
                "sort"          => TRUE
            ],
            [  
                "name"          => "themes",
                "label"         => "Themes",
                "type"          => "multiplePicker",
                "longList"      => false,
                "allowInsert"   => true,
                "objectTypes"   => ["theme"],
                "order"         => false
                ],
        ],
        "actions"        => [
            "insert", "edit", "delete", "order"
        ]
    ];
