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/SBogers84/zuiderbos.nl/workbench/komma/kms/src/Komma/Kms/Jobs/JobSection.php
<?php

/**
 * @author      Pascal Lemmen <pascal@komma.pro>
 * @copyright   (c) 2012-2016, Komma Mediadesign
 */

namespace Komma\Kms\Jobs;

use Komma\Kms\Core\Kms;
use Komma\Kms\Core\Sections\KmsSection;
use Komma\Kms\Core\Sections\KmsSectionTabs;

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

    public $showSave = [0,1,2,3];         // Options: 'all' | 'admin' (SuperAdmin only) | 'none' (or anything else what isn't all or admin)
    public $showDelete = [0,1,2,3];
    public $showCreate = [0,1,2,3];

    protected $entityAttributesData = [
        'information_label' => [
            'type' => 'Komma\Kms\Core\Attributes\KmsTitle',
            'options' => [
                'title' => 'Settings',
            ],
        ],
        'active' => [
            'type' => 'Komma\Kms\Core\Attributes\KmsOnOff',
            'options' => [
                'label' => 'Actief',
            ]
        ],

        'name' => [
            'type' => 'Komma\Kms\Core\Attributes\KmsTextField',
            'options' => [
                'label' => 'Name',
                'placeholder' => 'vb Leraar lichamelijke opvoeding'
            ]
        ],

        'page_code_name' => [
            'type' => 'Komma\Kms\Core\Attributes\KmsTextField',
            'options' => [
                'label' => 'Codename vacaturepagina',
                'placeholder' => ''
            ]
        ],

        'pay' => [
            'type' => 'Komma\Kms\Core\Attributes\KmsTextField',
            'options' => [
                'label' => 'Salaris',
                'placeholder' => 'voorbeeld: Schaal L11 € 2.758,- tot € 4.434,- bruto per maand (op fulltime basis)'
            ]
        ],

        'contract' => [
            'type' => 'Komma\Kms\Core\Attributes\KmsTextField',
            'options' => [
                'label' => 'Contract',
                'placeholder' => 'voorbeeld: Meteen een jaarcontract met uitzicht op vast'
            ]
        ],

        'possibilities' => [
            'type' => 'Komma\Kms\Core\Attributes\KmsTextField',
            'options' => [
                'label' => 'Mogelijkheden',
                'placeholder' => 'voorbeeld: Allerlei opleidingsmogelijkheden en ruimte om te groeien'
            ]
        ],

        'contact_email' => [
            'type' => 'Komma\Kms\Core\Attributes\KmsTextField',
            'options' => [
                'label' => 'Emailadres contactpersoon',
                'placeholder' => ''
            ]
        ],

        'contact_email_name' => [
            'type' => 'Komma\Kms\Core\Attributes\KmsTextField',
            'options' => [
                'label' => 'Naam contactpersoon (email)',
                'placeholder' => ''
            ]
        ],

        'contact_phone' => [
            'type' => 'Komma\Kms\Core\Attributes\KmsTextField',
            'options' => [
                'label' => 'Tel. internationaal',
                'placeholder' => ''
            ]
        ],

        'contact_phone_name' => [
            'type' => 'Komma\Kms\Core\Attributes\KmsTextField',
            'options' => [
                'label' => 'Naam contactpers. (telefoon)',
                'placeholder' => ''
            ]
        ],

        'contact_whatsapp' => [
            'type' => 'Komma\Kms\Core\Attributes\KmsTextField',
            'options' => [
                'label' => 'Tel. int. (Whatsapp)',
                'placeholder' => ''
            ]
        ],

        'contact_whatsapp_name' => [
            'type' => 'Komma\Kms\Core\Attributes\KmsTextField',
            'options' => [
                'label' => 'Naam contactpers. (whatsapp)',
                'placeholder' => ''
            ]
        ],

        'description' => [
            'type' => 'Komma\Kms\Core\Attributes\KmsTextEditor',
            'forEach' => 'AllLanguages',
            'options' => [
                'label' => 'Omschrijving',
                'placeholder' => 'Voer hier een omschrijving toe'
            ]
        ],

//        'file' => [
//            'type'    => 'Komma\Kms\Core\Attributes\KmsFileS',
//            'options' => [
//                'label'       => 'Bestand',
//                'placeholder' => 'Bestand',
//                'parentField' => 'parent_id',
//                'subfolder'   => 'newsletter',
//                'maxFiles'    => 1,
//            ]
//        ],


    ];

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

    function getThumbnail()
    {
        if(isset($this->entity) && isset($this->entity->person) && sizeof($this->entity->person) > 0) return "<img src='".$this->entity->person[0]['thumb_image_url']."'>";
        return parent::getThumbnail();
    }
}