Allow to specify which label profiles are shown in dropdown.

This commit is contained in:
Jan Böhmer 2020-05-02 19:47:31 +02:00
parent 3804e2534d
commit 8b372a3443
8 changed files with 64 additions and 80 deletions

View file

@ -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
*/