HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers10/honger7.komma.pro/app/KommaApp/Cases/Kms/CaseSection.php
<?php
/**
 *
 *
 * @author      Komma <info@komma.pro>
 * @copyright   (c) 2012-2016, Komma
 */

namespace App\KommaApp\Cases\Kms;

use App\KommaApp\Kms\Core\Kms;
use App\KommaApp\Kms\Core\Sections\KmsSectionTabs;
use App\KommaApp\Kms\Core\Sections\KmsSiteSection;

class CaseSection extends KmsSiteSection
{
    protected $title = "Cases";
    protected $subTitle = "All cases";
    protected $slug = "cases";

    public $showSave = 'all';
    public $showDelete = 'all';
    public $showCreate = 'all';

    protected $modelAttributesData = [

        // Pages Attributes
        'page_label' => [
            'type' => 'KommaApp\Kms\Core\Attributes\KmsTitle',
            'options' => [
                'populate'=>false,
                'title' => 'Cases'
            ],
        ],
//        'controller' => [
//            'type' => 'KommaApp\Kms\Core\Attributes\KmsTextField',
//            'options' => [
//                'label' => 'lang_get:kms/pages.controller',
//                'placeholder' => 'Enter a controller',
//                    'onlyForSuperAdmin' => false,
//                'default_value'=> 'pageController@show'
//            ]
//        ],

        'active' => [
            'type' => 'KommaApp\Kms\Core\Attributes\KmsOnOff',
            'options' => [
                'label' => 'active',
                //'class' => 'hidden'
            ],
        ],

        'code_name' => [
            'type' => 'KommaApp\Kms\Core\Attributes\KmsTextField',
            'options' => [
                'label' => 'lang_get:kms/global.code_name',
                'placeholder' => 'Enter a name',
            ]
        ],


        'primary_color' => [
            'type' => 'KommaApp\Kms\Core\Attributes\KmsTextField',
            'options' => [
                'label' => 'Primary color',
                'placeholder' => 'f.e. #00BDFF',
            ]
        ],


        'drip_color' => [
            'type' => 'KommaApp\Kms\Core\Attributes\KmsTextField',
            'options' => [
                'label' => 'Drip color',
                'placeholder' => 'f.e. #00BDFF',
            ]
        ],

        'parent_id' => [
            'type' => 'KommaApp\Kms\Core\Attributes\KmsSelect',
            'options' => [
                'label' => 'lang_get:kms/pages.parent_page',
                'class' => 'hidden',
                'placeholder' => 'Select a parent page',
                'data' => 'KommaApp\Cases\Kms\CaseRepository@getModelsForSelect',
                'exclude' => '[[modelId]]',
//                'data_example' => [
//                    ['value' => 'Item 1', 'content' => 'Data: item 1', 'htmlContent' => '<i>Data: Item 1</i>'],
//                    ['value' => 'Item 2', 'content' => 'Data: item 2', 'htmlContent' => '<i>Data: Item 2</i>'],
//                    ['value' => 'Item 3', 'content' => 'Data: item 3', 'htmlContent' => '<i>Data: Item 3</i>'],
//                ]
            ]
        ],

        'images' => [
            'type' => 'KommaApp\Kms\Core\Attributes\KmsImages',
            'options' => [
                'label' => 'Thumbnail',
                'subfolder' => 'pages',
                'maxImages' => 1,
                'small' => [
                    'method' => 'crop',
                    'width' => 840,
                    'height' => 600
                ],
                'medium' => [
                    'method' => 'crop',
                    'width' => 1680,
                    'height' => 1280
                ],
                'large' => [
                    'method' => 'crop',
                    'width' => 2520,
                    'height' => 1920
                ],
            ]
        ],


        // Pages Translation Attributes
        'information_label' => [
            'type' => 'KommaApp\Kms\Core\Attributes\KmsTitle',
            'forEach' => 'CurrentSiteLanguages',
            'options' => [
                'title' => 'lang_get:kms/global.information'
            ],
        ],


        'name' => [
            'type' => 'KommaApp\Kms\Core\Attributes\KmsTextField',
            'forEach' => 'CurrentSiteLanguages',
            'options' => [
                'label' => 'lang_get:kms/global.title',
                'placeholder' => 'Enter a title',
                'validation' => [
                    'rules' => 'required',
                    'messages' => [
                        'required' => 'You need to enter a title',
                    ]
                ],
            ]
        ],

        'slug' => [
            'type' => 'KommaApp\Kms\Core\Attributes\KmsSlug',
            'forEach' => 'CurrentSiteLanguages',
            'options' => [
                'label' => 'Slug',
                'class' => 'hidden',
                'placeholder' => 'Enter a slug',
                'autoSlugField' => 'name_[[languageId]]',
                'validation' => [
                    'rules' => 'required',
                    'messages' => [
                        'required' => 'You need to enter a slug',
                    ]
                ]
            ]
        ],

        'meta_description' => [
            'type' => 'KommaApp\Kms\Core\Attributes\KmsTextArea',
            'forEach' => 'CurrentSiteLanguages',
            'options' => [
                'label' => 'lang_get:kms/global.metaDescription',
                'placeholder' => 'Enter a description'
            ]
        ],


        'description' => [
            'type' => 'KommaApp\Kms\Core\Attributes\KmsTextEditor',
            'forEach' => 'CurrentSiteLanguages',
            'options' => [
                'label' => 'lang_get:kms/global.description',
                'placeholder' => 'Enter a description'
            ]
        ],
    ];

    function __construct(
        Kms $kms,
        CaseRepository $repository,
        KmsSectionTabs $tabs)
    {
        parent::__construct($kms, $repository, $tabs);
    }

    /**
     * This method will stop the load entities of the kmsSiteSection
     *
     * @return array
     *
     */
    public function loadEntities(){
        return [];
    }

}