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/BVerhoeven/verhoevendak.nl/workbench/komma/kms/src/Komma/Kms/Jobs/JobSection.php
<?php
/**
 * Short description for the file.
 *
 * @author      Komma <info@komma.pro>
 * @copyright   (c) 2012-2015, Komma Mediadesign
 */

namespace Komma\Kms\Jobs;

use Komma\Kms\Jobs\Models\Job;
use Komma\Kms\Core\Kms;
use Komma\Kms\Core\Sections\KmsSectionTabs;
use Komma\Kms\Core\Sections\KmsSection;

class JobSection extends KmsSection
{
    protected $title = "Vacatures";
    protected $subTitle = "Vacatures";
    protected $slug = "jobs";

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

    protected $entityAttributesData = [
        // Jobs Attributes
        'active' => [
            'type' => 'Komma\Kms\Core\Attributes\KmsOnOff',
            'options' => [
                'label' => 'Actief',
                'placeholder' => 1
            ],
        ],
        'code_name' => [
            'type' => 'Komma\Kms\Core\Attributes\KmsTextField',
            'options' => [
                'label' => 'Code naam',
                'placeholder' => 'code naam van de vacature',
                'validation' => [
                    'rules' => 'required',
                    'messages' => [
                        'required' => 'Voeg een titel toe',
                    ]
                ],
                'show' => 'admin'
            ],
        ],
        'date' => [
            'type' => 'Komma\Kms\Core\Attributes\KmsDate',
            'options' => [
                'label' => 'Job datum',
                'placeholder' => 'Toegevoegd op',
            ]
        ],

        'images' => [
            'type' => 'Komma\Kms\Core\Attributes\KmsImages',
            'options' => [
                'label' => 'Eventuele afbeelding (max:20)',
                'subFolder' => 'features',
                'maxImages' => 20,
                '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' => '2MB' // default 5MB
                ],
            ]
        ],


        'name' => [
            'type' => 'Komma\Kms\Core\Attributes\KmsTextField',
            'forEach' => 'AllLanguages',
            'options' => [
                'label' => 'Titel',
                'placeholder' => 'Titel van de vacature',
            ],
        ],

        'excerpt' => [
            'type' => 'Komma\Kms\Core\Attributes\KmsTextEditor',
            'forEach' => 'AllLanguages',
            'options' => [
                'label' => 'Korte omschrijving',
                'placeholder' => 'Korte omschrijving',
            ]
        ],

        'description' => [
            'type' => 'Komma\Kms\Core\Attributes\KmsTextEditor',
            'forEach' => 'AllLanguages',
            'options' => [
                'label' => 'Vacature omschrijving',
                'placeholder' => 'Vacature omschrijving',
            ]
        ],

    ];

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