Added dropdowns for quick generating labels for different profiles.

This commit is contained in:
Jan Böhmer 2020-05-01 20:29:18 +02:00
parent 747962884a
commit 48ff81a6d1
8 changed files with 118 additions and 3 deletions

View file

@ -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.