File: D:/HostingSpaces/SBogers33/bbec.nl/workbench/komma/kms/src/Komma/Kms/Documents/DocumentSection.php
<?php
/**
* Short description for the file.
*
* @author Jaap Faes <jaap@komma.pro>
* @copyright (c) 2012-2015, Komma Mediadesign
*/
namespace Komma\Kms\Documents;
use Komma\Kms\Core\Kms;
use Komma\Kms\Core\Sections\KmsSectionTabs;
use Komma\Kms\Core\Sections\KmsSection;
class DocumentSection extends KmsSection
{
protected $title = "Doucmenten";
protected $subTitle = "Hier kun je de documenten uploaden.";
protected $slug = "documents";
public $showCreate = 'admin';
public $showDelete = 'admin';
protected $entityAttributesData = [
// Pages Translation Attributes
'active' => [
'type' => 'Komma\Kms\Core\Attributes\KmsOnOff',
'options' => [
'label' => 'Toon op website',
'show' => 'admin',
]
],
'code_name' => [
'type' => 'Komma\Kms\Core\Attributes\KmsTextField',
'options' => [
'label' => 'Code name',
'placeholder' => 'Code name van het bestand',
'show' => 'admin',
],
],
'name' => [
'type' => 'Komma\Kms\Core\Attributes\KmsTextField',
'options' => [
'label' => 'Naam',
'placeholder' => 'Naam van het bestand',
'validation' => [
'rules' => 'required | unique:documents,name,[[entityId]]',
'messages' => [
'required' => 'Je moet een naam invullen',
'unique' => 'This name already exists',
]
]
],
],
'file' => [
'type' => 'Komma\Kms\Core\Attributes\KmsFileS',
'options' => [
'label' => 'Bestanden',
'placeholder' => 'Bestand',
'parentField' => 'parent_id',
'subfolder' => null,
'maxFiles' => 1,
]
],
// 'document_type' => [
// 'type' => 'Komma\Kms\Core\Attributes\KmsSelect',
// 'options' => [
// 'label' => 'Categorie',
// 'placeholder' => '',
// 'data' => 'Komma\Kms\Documents\DocumentRepository@getDocumentCategories'
// ]
// ]
];
function __construct(
Kms $kms,
DocumentRepository $repository,
KmsSectionTabs $tabs)
{
parent::__construct($kms, $repository, $tabs);
}
}