oms-ClientManagement/Models/ClientL11nType.php

94 lines
1.5 KiB
PHP
Executable File

<?php
/**
* Karaka
*
* PHP Version 8.1
*
* @package Modules\ClientManagement\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://jingga.app
*/
declare(strict_types=1);
namespace Modules\ClientManagement\Models;
/**
* Client class.
*
* @package Modules\ClientManagement\Models
* @license OMS License 1.0
* @link https://jingga.app
* @since 1.0.0
*/
class ClientL11nType implements \JsonSerializable
{
/**
* Article ID.
*
* @var int
* @since 1.0.0
*/
protected int $id = 0;
/**
* Identifier for the l11n type.
*
* @var string
* @since 1.0.0
*/
public string $title = '';
/**
* Is the l11n type required for an item?
*
* @var bool
* @since 1.0.0
*/
public bool $isRequired = false;
/**
* Constructor.
*
* @param string $title Title
*
* @since 1.0.0
*/
public function __construct(string $title = '')
{
$this->title = $title;
}
/**
* Get id
*
* @return int
*
* @since 1.0.0
*/
public function getId() : int
{
return $this->id;
}
/**
* {@inheritdoc}
*/
public function toArray() : array
{
return [
'id' => $this->id,
'title' => $this->title,
];
}
/**
* {@inheritdoc}
*/
public function jsonSerialize() : mixed
{
return $this->toArray();
}
}