2021-04-21 12:16:25 +02:00
|
|
|
<?PHP
|
|
|
|
/**
|
|
|
|
* Contains a helper class for a field entry.
|
|
|
|
*
|
|
|
|
* @author Nathan Eikermann <nathan@museum-digital.de>
|
|
|
|
*/
|
|
|
|
declare(strict_types = 1);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Class holding the information for a field entry.
|
|
|
|
*/
|
2022-03-15 10:30:09 +01:00
|
|
|
final class FieldEntry {
|
|
|
|
|
2021-05-05 20:42:14 +02:00
|
|
|
public bool $required;
|
2021-04-21 12:16:25 +02:00
|
|
|
public array $allowedValues;
|
|
|
|
public array $dependsOn;
|
|
|
|
public string $remark;
|
|
|
|
public string $name_human_readable;
|
|
|
|
public string $explica;
|
2021-04-30 21:43:31 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Function for constructing a new FieldEntry Object.
|
|
|
|
*
|
2022-03-15 10:30:09 +01:00
|
|
|
* @param boolean $required True if the field is required.
|
|
|
|
* @param array $allowedValues Array of allowed values.
|
|
|
|
* @param array $dependsOn Array of fields the entry depends on.
|
|
|
|
* @param string $remark String variable.
|
|
|
|
* @param string $name_human_readable Human readable translation.
|
|
|
|
* @param string $explica String variable
|
2021-04-30 21:43:31 +02:00
|
|
|
*/
|
|
|
|
public function __construct(
|
2021-05-05 20:42:14 +02:00
|
|
|
bool $required, array $allowedValues,
|
2021-04-30 21:43:31 +02:00
|
|
|
array $dependsOn, string $remark,
|
|
|
|
string $name_human_readable, string $explica
|
|
|
|
) {
|
|
|
|
$this->required = $required;
|
|
|
|
$this->allowedValues = $allowedValues;
|
|
|
|
$this->dependsOn = $dependsOn;
|
|
|
|
$this->remark = $remark;
|
|
|
|
$this->name_human_readable = $name_human_readable;
|
|
|
|
$this->explica = $explica;
|
|
|
|
|
|
|
|
}
|
2021-04-21 12:16:25 +02:00
|
|
|
}
|