mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-05 06:55:27 +01:00
Added dropdowns for quick generating labels for different profiles.
This commit is contained in:
@@ -27,6 +27,19 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
class LabelProfileRepository extends NamedDBElementRepository
|
||||
{
|
||||
|
||||
/**
|
||||
* Find the profiles that are shown in the dropdown for the given type.
|
||||
* You should maybe use the cached version of this in LabelProfileDropdownHelper
|
||||
* @param string $type
|
||||
* @return array
|
||||
*/
|
||||
public function getDropdownProfiles(string $type): array
|
||||
{
|
||||
//TODO: Improve this, when we have a 'showInDropdown' flag for profiles.
|
||||
return $this->findForSupportedElement($type);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a tree of TreeViewNode elements. The root elements has $parent as parent.
|
||||
* The treeview is generic, that means the href are null and ID values are set.
|
||||
|
||||
Reference in New Issue
Block a user