File: D:/HostingSpaces/EUmans/umansradepo.be/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
{
protected $title = "Blokken";
protected $subTitle = "Admin";
protected $slug = "blocks";
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 = [
'information_label' => [
'type' => 'Komma\Kms\Core\Attributes\KmsTitle',
'options' => [
'title' => 'Instellingen',
],
],
'active' => [
'type' => 'Komma\Kms\Core\Attributes\KmsOnOff',
'options' => [
'label' => 'Toon op website',
'onlyForSuperAdmin' => true,
]
],
'code_name' => [
'type' => 'Komma\Kms\Core\Attributes\KmsTextField',
'options' => [
'onlyForSuperAdmin' => true,
'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',
]
],
'view' => [
'type' => 'Komma\Kms\Core\Attributes\KmsSelect',
'options' => [
'label' => 'Call-to-action',
'placeholder' => 'Select a cta',
'data' =>
[
['value' => ' ', 'content' => 'Geen cta'],
['value' => 'advice', 'content' => 'Gratis advies op maat'],
['value' => 'performance', 'content' => 'Gratis rendementsberekening'],
['value' => 'contact', 'content' => 'Contact opnemen'],
['value' => 'offer-form', 'content' => 'Offerteformulier'],
['value' => 'contact-2', 'content' => 'Afspraak maken'],
['value' => 'alu-windows', 'content' => 'Ontdek alle voordelen van aluminium ramen'],
['value' => 'alu-doors', 'content' => 'Ontdek alle voordelen van aluminium deuren'],
['value' => 'pvc-windows', 'content' => 'Ontdek de voordelen van PVC-ramen'],
['value' => 'pvc-doors', 'content' => 'Ontdek de voordelen van PVC-deuren'],
]
],
],
'images' => [
'type' => 'Komma\Kms\Core\Attributes\KmsImages',
'options' => [
'label' => 'Images',
'subFolder' => 'blocks',
'maxImages' => 4,
'uploadSizes' => [
'original' => ['method' => 'fit', 'width' => 2000, 'height' => 8000],
'large' => ['method' => 'fit', 'width' => 1200, '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
],
]
],
'type' => [
'type' => 'Komma\Kms\Core\Attributes\KmsTextField',
'options' => [
'class' => 'hidden',
'label' => 'Type',
'placeholder' => 'ex. home',
]
],
'spacer' => [
'type' => 'Komma\Kms\Core\Attributes\KmsSeparator',
],
'name' => [
'type' => 'Komma\Kms\Core\Attributes\KmsTextField',
'forEach' => 'AllLanguages',
'options' => [
'label' => 'Titel',
'placeholder' => 'ex. Hoe laat zijn jullie open? ',
'validation' => [
'rules' => '',
'messages' => [
'required' => 'Je moet een Titel invullen',
]
]
]
],
'description' => [
'type' => 'Komma\Kms\Core\Attributes\KmsTextEditor',
'forEach' => 'AllLanguages',
'options' => [
'label' => 'Description',
'placeholder' => 'Enter a description'
]
],
];
function __construct(
Kms $kms,
BlockRepository $repository,
KmsSectionTabs $tabs)
{
parent::__construct($kms, $repository, $tabs);
}
}