mirror of
https://github.com/AzuraCast/AzuraCast.git
synced 2024-06-18 06:57:05 +00:00
Add "auto_assign" to custom field.
This commit is contained in:
parent
9a2f837586
commit
d207a8ae83
|
@ -25,7 +25,7 @@ return [
|
|||
],
|
||||
],
|
||||
|
||||
'auto_set_from' => [
|
||||
'auto_assign' => [
|
||||
'select',
|
||||
[
|
||||
'label' => __('Automatically Set from ID3v2 Value'),
|
||||
|
|
|
@ -47,6 +47,15 @@ class CustomField
|
|||
*/
|
||||
protected $short_name;
|
||||
|
||||
/**
|
||||
* @ORM\Column(name="auto_assign", type="string", length=100, nullable=true)
|
||||
*
|
||||
* @OA\Property()
|
||||
*
|
||||
* @var string|null An ID3v2 field to automatically assign to this value, if it exists in the media file.
|
||||
*/
|
||||
protected $auto_assign;
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
|
@ -97,4 +106,28 @@ class CustomField
|
|||
$this->short_name = $this->_truncateString($short_name, 100);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string|null
|
||||
*/
|
||||
public function getAutoAssign(): ?string
|
||||
{
|
||||
return $this->auto_assign;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function hasAutoAssign(): bool
|
||||
{
|
||||
return !empty($this->auto_assign);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string|null $auto_assign
|
||||
*/
|
||||
public function setAutoAssign(?string $auto_assign): void
|
||||
{
|
||||
$this->auto_assign = $auto_assign;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user