ZoneTemplateGroupShares
class ZoneTemplateGroupShares (View source)
Which user groups a zone template is shared with. The owner shares with groups they belong to, a ueberuser with any group; members of a group see, apply and (with zone_templ_edit) edit the template.
Methods
No description
Groups the user may add to or remove from a template's share list.
Groups the template is shared with, as the user may see them.
Refusal for a share list update(), or null when it would be accepted. Lets a caller check the list before saving the rest of the form.
The groups a template being created is shared with, or the refusal. The creator becomes the owner, so the owner's rules apply.
Set the template's share list to the submitted groups. Stored groups the user may not share with stay as they are; submitting one that is not stored is refused.
Details
__construct(ZoneTemplateRepositoryInterface $repository, ZoneTemplateAccessPolicy $access, UserGroupLookupInterface $groups)
No description
array
shareableGroups(int $userId)
Groups the user may add to or remove from a template's share list.
array
sharedGroups(int $zone_templ_id, int $userId)
Groups the template is shared with, as the user may see them.
ZoneTemplateWriteResult|null
refusal(int $zone_templ_id, array $submittedGroupIds, int $userId)
Refusal for a share list update(), or null when it would be accepted. Lets a caller check the list before saving the rest of the form.
ZoneTemplateWriteResult|array
groupsForNewTemplate(array $submittedGroupIds, int $userId)
The groups a template being created is shared with, or the refusal. The creator becomes the owner, so the owner's rules apply.
ZoneTemplateWriteResult
update(int $zone_templ_id, array $submittedGroupIds, int $userId)
Set the template's share list to the submitted groups. Stored groups the user may not share with stay as they are; submitting one that is not stored is refused.