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

namespace Komma\Kms\Users;

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

class UserSection extends KmsSection
{
    protected $title = "Users";
    protected $subTitle = "The administrators for KMS";
    protected $slug = "users";

    protected $entityAttributesData = [
        'information_label' => [
            'type' => 'Komma\Kms\Core\Attributes\KmsTitle',
            // 'tab' => 'test',
            'options' => [
                'title' => 'Information',
            ],
        ],
        'is_admin' => [
            'type' => 'Komma\Kms\Core\Attributes\KmsOnOff',
            'options' => [
                'label' => 'Super admin',
                'onlyForSuperAdmin' => true
            ]
        ],
        'username' => [
            'type' => 'Komma\Kms\Core\Attributes\KmsTextField',
            'options' => [
                'label' => 'Username',
                'placeholder' => 'Enter a username',
                'lowercase' => true,
                'validation' => [
                    'rules' => 'required|unique:users,username,[[entityId]]',
                    'messages' => [
                        'required' => 'You need to enter a username',
                        'unique' => 'This username is already registered'
                    ]
                ]
            ]
        ],
        'email' => [
            'type' => 'Komma\Kms\Core\Attributes\KmsTextField',
            'options' => [
                'label' => 'Email',
                'placeholder' => 'Enter a email',
                'lowercase' => true,
                'validation' => [
                    'rules' => 'required|email|unique:users,email,[[entityId]]',
                    'messages' => [
                        'required' => 'You need to enter an email address',
                        'email' => 'You need to enter a valid email address',
                        'unique' => 'This email address is already registered'
                    ]
                ]
            ]
        ],
        'password' => [
            'type' => 'Komma\Kms\Core\Attributes\KmsPassword',
            'options' => [
                'label' => 'Password',
                'placeholder' => 'Enter a password',
                'validation' => [
                    'rules' => 'required|min:5',
                    'messages' => [
                        'required' => 'You need to enter an password',
                    ]
                ]
            ]
        ],
        'spacer_1' => [
            'type' => 'Komma\Kms\Core\Attributes\KmsSeparator'
        ],
        'first_name' => [
            'type' => 'Komma\Kms\Core\Attributes\KmsTextField',
            'options' => [
                'label' => 'First name',
                'placeholder' => 'Enter a first name'
            ]
        ],
        'last_name' => [
            'type' => 'Komma\Kms\Core\Attributes\KmsTextField',
            'options' => [
                'label' => 'Last name',
                'placeholder' => 'Enter a last name'
            ]
        ]
    ];

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

}