File: D:/HostingSpaces/SBogers33/bbec.nl/workbench/komma/kms/src/Komma/Kms/Categories/CategorySection.php
<?php
/**
* Short description for the file.
*
* @author Komma <info@komma.pro>
* @copyright (c) 2012-2015, Komma Mediadesign
*/
namespace Komma\Kms\Categories;
use Komma\Kms\Categories\Models\Category;
use Komma\Kms\Core\Kms;
use Komma\Kms\Core\Sections\KmsSectionTabs;
use Komma\Kms\Core\Sections\KmsSection;
class CategorySection extends KmsSection
{
protected $title = "Categorieën";
protected $subTitle = "Admin";
protected $slug = "categories";
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 = [
// Categories Attributes
'page_label' => [
'type' => 'Komma\Kms\Core\Attributes\KmsTitle',
'options' => [
'title' => 'Gebruik de tabs om te categorie namen te wijzigingen',
],
],
'parent_id' => [
'type' => 'Komma\Kms\Core\Attributes\KmsSelect',
'options' => [
'label' => 'Parent category',
'show' => false,
'placeholder' => 'Select a parent category',
'data' => 'Komma\Kms\Categories\CategoryRepository@getForSelect',
'exclude' => '[[entityId]]',
// 'data_example' => [
// ['value' => 'Faes', 'content' => 'Data: test', 'htmlContent' => '<i>Data: test</i>'],
// ['value' => 'Faas', 'content' => 'Data: testen', 'htmlContent' => '<i>Data: testen</i>'],
// ['value' => 'Faesch', 'content' => 'Data: tester', 'htmlContent' => '<i>Data: tester</i>'],
// ],
]
],
'name' => [
'type' => 'Komma\Kms\Core\Attributes\KmsTextField',
'forEach' => 'AllLanguages',
'options' => [
'label' => 'Naam',
'placeholder' => 'Naam van de categorie',
],
],
];
function __construct(
Kms $kms,
CategoryRepository $repository,
KmsSectionTabs $tabs)
{
parent::__construct($kms, $repository, $tabs);
}
}