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/SBogers33/bbec.nl/workbench/komma/kms/src/Komma/Kms/Blocks/BlockSection.php
<?php

/**
 * @author      Komma <support@komma.pro>
 * @copyright   (c) 2012-2016, Komma Mediadesign
 */

namespace Komma\Kms\Blocks;

use Komma\Kms\Core\Kms;
use Komma\Kms\Core\Sections\KmsSection;
use Komma\Kms\Core\Sections\KmsSectionTabs;

class BlockSection extends KmsSection
{
     public $title = "Teksten";
    public $subTitle = "Dynamic";
    public $slug = "blocks";
    public $type = "so-vught-parents";
    public $listView = 'kms::partials.entities.index_dynamic';
    public $view = 'kms::partials.entity.index_dynamic';
    public $subType = '';

    public $showSave = 'all';         // Options: 'all' | 'admin' (SuperAdmin only) | 'none' (or anything else what isn't all or admin)
    public $showDelete = 'admin';
    public $showCreate = 'admin';

    protected $entityAttributesData = [

        'active' => [
            'type' => 'Komma\Kms\Core\Attributes\KmsOnOff',
            'options' => [
                'label' => 'Toon op website',
                'show' => 'admin',
            ]
        ],
        'code_name' => [
            'type' => 'Komma\Kms\Core\Attributes\KmsTextField',
            'options' => [
                'show' => 'admin',
                'label' => 'Code name',
                'placeholder' => 'vb block_1',
                'validation' => [
                    'rules' => 'required | unique:blocks,code_name,[[entityId]]',
                    'messages' => [
                        'required' => 'Je moet een naam invullen',
                        'unique' => 'This code_name already exists',
                    ]
                ]
            ]
        ],
        'navigation_label' => [
            'type' => 'Komma\Kms\Core\Attributes\KmsTextField',
            'options' => [
                'label' => 'Navigation Label',
                'placeholder' => 'vb Introductie',
                'show' => 'admin',
            ]
        ],
        'view' => [
            'type' => 'Komma\Kms\Core\Attributes\KmsTextField',
            'options' => [
                'show' => false,
                'label' => 'View',
                'placeholder' => 'vb layouts.partial.contactUs'
            ]
        ],

        'type' => [
            'type' => 'Komma\Kms\Core\Attributes\KmsTextField',
            'options' => [
                'label' => 'Type',
                'placeholder' => 'ex. home',
                'show' => false
            ]
        ],

        'spacer' => [
            'type' => 'Komma\Kms\Core\Attributes\KmsSeparator',
            'options' => [
                'show' => 'admin',
            ]
        ],

        'information_label' => [
            'type' => 'Komma\Kms\Core\Attributes\KmsTitle',
            'options' => [
                'show' => 'admin',
                'title' => 'Optional',
            ],
        ],

        'name' => [
            'type' => 'Komma\Kms\Core\Attributes\KmsTextField',
            'forEach' => 'AllLanguages',
            'options' => [
                'class' => 'hidden',
                'show' => 'admin',
                'label' => 'Titel',
                'placeholder' => 'ex.  Hoe laat zijn jullie open? ',
            ]
        ],
        'images' => [
            'type' => 'Komma\Kms\Core\Attributes\KmsImages',
            'options' => [
                'show' => 'admin',
                'label' => 'Images',
                'subFolder' => 'blocks',
                'maxImages' => 5,
                'uploadSizes' => [
                    'original' => ['method' => 'fit', 'width' => 2000, 'height' => 8000],
                    'large' => ['method' => 'fit', 'width' => 1400, 'height' => 8000],
                    'medium' => ['method' => 'fit', 'width' => 500, 'height' => 8000],
                    'thumb' => ['method' => 'crop', 'width' => 128, 'height' => 128]
                ],
                'uploadRules' => [
                    //Possible uploadRules max-height(x),min-height(x),max-width(x),min-width(x),max-size(xMB), min-size(xMB)
                    'max-height' => "4000", //default 4000
                    'max-size' => '4MB' // default 5MB
                ],
            ]
        ],


        // DON'T CHANGE LOCATION OF THIS ATTRIBUTE
        // In the Dynamic Controller it will populate the dynamic lock option
        'description' => [
            'type' => 'Komma\Kms\Core\Attributes\KmsDynamic',
            'forEach' => 'AllLanguages',
            'options' => [
                'subFolder' => 'dynamic',
                'label' => 'Content',
                'blockSettings' => [
                    'full_text_block' => [
                    ],
//                    'two_column_block' => [
//                        'subFolder' => 'dynamic'
//                    ],
                    'content_block' => [
                        'subFolder' => 'dynamic',
                    ],
//                    'full_image_block' => [
//                        'max_images' => 1,
//                        'subFolder' => 'dynamic',
//                    ],

//                    'multiple_images_block' => [
//                        'tab' => [
//                            ['max_images' => 1],
//                            ['max_images' => 1]],
//                        'subFolder' => 'dynamic'
//                    ],
                    'video_block' => [
                        'typeName' => 'Video',
                        'youtube' => ''
                    ],
                    'view_block' => [
                    ],
                ]
            ]
        ],


    ];

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