<?php
return array(
    "type" => "client",
    "model" => "App\Models\Client",
    "label" => "clients",
    "label_singular" => "client",
    "group" => "solutions",
    "template" => false,
    "order" => true,
    "websites" => array(1),
    "search" => array(
        1 => array(
            "primary" => array("title"),
            "secondary" => array("content"),
            "display" => array(
                "title" => "title",
                "content" => "reference_summary|content",
                "image_id" => "logo"
            ),
            "uri" => array(
                "en" => '/why-spg/notable-clients',
                "de" => '/warum-spg/references',
                "sv" => '/why-spg/notable-clients',
                "fr" => '/why-spg/notable-clients',
                "es" => '/why-spg/notable-clients',
                "pt" => '/why-spg/notable-clients'
            )
        )
    ),
    "fields" => array(
        array(
            "name" => "title",
            "label" => "title",
            "type" => "textBox",
            "maxLength" => 100,
            "multiLanguage" => true,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation" => "required|max:100",
            "inList" => true,
            "search" => true,
            "sort" => true
        ),
        array(
            "name" => "content",
            "label" => "details",
            "type" => "editor",
            "multiLanguage" => true,
            "preValidation" => "trim",
            "validation" => ""
        ),
        array(
            "name" => "website",
            "label" => "website",
            "type" => "textBox",
            "maxLength" => 255,
            "multiLanguage" => false,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation" => "max:255",
            "inList" => false,
            "search" => false,
            "sort" => false
        ),
        array(
            "name" => "logo",
            "label" => "logo image",
            "type" => "mediaPicker",
            "multiLanguage" => false,
            "mediaType" => "image",
            "placement" => "sidebar",
            "multiple" => false,
            "minSize" => "0",
            /*
            "thumbnailSizes" => array(
                array("type" => "fit", "name" => "280x150", "width" => 280, "height" => 150),
            ),
            */
            "relatedContentType" => 'client'
        ),
        array(
            "name" => "type",
            "label" => "type",
            "type" => "selectBox",
            "list" => array(
                "corporate" => "Corporate",
                "public" => "Public"
            ),
            "preValidation" => "trim",
            "validation" => "required|in:corporate,public",
            "placement" => "sidebar"
        ),
        array(
            "name" => "case_study_id",
            "label" => "case study",
            "type" => "selectBox",
            "contentType" => "case_study",
            "preValidation" => "trim",
            "validation" => "nullable|integer|min:0",
            "inList" => false,
            "search" => false,
            "sort" => false,
            "placement" => "sidebar"
        ),
    ),
    "actions" => array(
        "insert", "edit", "duplicate", "delete", "order"
    )
);
