mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-12 19:34:31 +02:00
Allow to specify which label profiles are shown in dropdown.
This commit is contained in:
parent
3804e2534d
commit
8b372a3443
8 changed files with 64 additions and 80 deletions
|
@ -56,6 +56,12 @@ class LabelProfile extends AttachmentContainingDBElement
|
|||
*/
|
||||
protected $comment = '';
|
||||
|
||||
/**
|
||||
* @var bool Determines, if this label profile should be shown in the dropdown quick menu.
|
||||
* @ORM\Column(type="boolean")
|
||||
*/
|
||||
protected $show_in_dropdown = true;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
@ -82,6 +88,28 @@ class LabelProfile extends AttachmentContainingDBElement
|
|||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true, if this label profile should be shown in label generator quick menu.
|
||||
* @return bool
|
||||
*/
|
||||
public function isShowInDropdown(): bool
|
||||
{
|
||||
return $this->show_in_dropdown;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the show in dropdown menu.
|
||||
* @param bool $show_in_dropdown
|
||||
* @return LabelProfile
|
||||
*/
|
||||
public function setShowInDropdown(bool $show_in_dropdown): LabelProfile
|
||||
{
|
||||
$this->show_in_dropdown = $show_in_dropdown;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue