File: D:/HostingSpaces/SBogers10/vebon.komma.pro/app/KommaApp/Translations/Kms/TranslationSection.php
<?php
namespace KommaApp\Translations\Kms;
/**
*
*
* @author Komma <info@komma.pro>
* @copyright (c) 2012-2016, Komma Mediadesign
*/
use KommaApp\Kms\Core\Kms;
use KommaApp\Kms\Core\Sections\KmsSection;
use KommaApp\Kms\Core\Sections\KmsSectionTabs;
class TranslationSection extends KmsSection
{
protected $title = "Translations";
protected $subTitle = "<a href='/kms/translations/import'>Vertaling importeren</a>";
protected $slug = "translations";
protected $modelAttributesData = [
'information_label' => [
'type' => 'KommaApp\Kms\Core\Attributes\KmsTitle',
'options' => [
'title' => 'lang_get:kms/global.information',
],
],
'group_name' => [
'type' => 'KommaApp\Kms\Core\Attributes\KmsTextField',
'options' => [
// 'canNotChange' => true,
'label' => 'lang_get:kms/translations.group_name',
'placeholder' => 'Enter a group name'
]
],
'parent_group' => [
'type' => 'KommaApp\Kms\Core\Attributes\KmsSelect',
'options' => [
'canNotChange' => true,
'label' => 'lang_get:kms/categories.part_of',
'placeholder' => 'Selecteer een hoofdgroep.',
'data' => 'KommaApp\Translations\Kms\TranslationRepository@getGroupsForSelect',
]
],
'translations' => [
'type' => 'KommaApp\Kms\Core\Attributes\KmsFieldGroup',
'tab' => 'lang_get:kms/global.general',
'options' => [
//'max_groups' => 5, //Max items
'sortable' => true,
'fields' => [
'key' => [
'type' => 'KommaApp\Kms\Core\Attributes\KmsTextField',
'options' => [
'label' => 'lang_get:kms/translations.name',
'placeholder' => 'Enter a key',
'width' => '20',
]
],
'value' => [
'type' => 'KommaApp\Kms\Core\Attributes\KmsTextField',
'forEach' => 'AllLanguages',
'tab' => 'config_get:kms.main.defaultTabName',
'options' => [
'label' => 'lang_get:kms/translations.translation[[LanguageName]]',
'placeholder' => 'Enter a translation',
'width' => '80',
],
],
],
]
]
];
function __construct(Kms $kms, TranslationRepository $repository, KmsSectionTabs $tabs)
{
parent::__construct($kms, $repository, $tabs);
}
}