ModelUsers module
Group
A model in the Users module, with 11 members for templates, 12 API properties and 17 members for admin templates.
Templates view
Properties 11
Take no arguments.
-
#
getPeopleCount() -
int - Returns the total count of the people assigned to the group. Reads the all-groups aggregate deliberately: this is the groups listing's member-count column, and one grouped scan per request is cheaper there than a COUNT per row. A page that deals with a single group must use {@see getMemberCount()} instead -- same number, group-scoped query.
-
#
getMemberCount() -
int - Returns the count of the people assigned to this one group. The single-group counterpart to {@see getPeopleCount()}: same number, but counted with a group-scoped query instead of read out of the all-groups aggregate, which scans the whole membership join table and holds a row per group in order to answer for one. Every page that deals with a single group must use this one. Memoised because a single group serialization can resolve it more than once: directly, and again through the select-support decision and the member-ID lookup on {@see \Users\Models\Backend\Group}.
-
#
getId() -
?int -
#
getName() -
?string -
#
getText() -
?string -
#
getPeople() -
?Collection<erson> -
#
isHierarchicalModel()Not in API & Jobs -
bool - Check whether a model is a hierarchical model, i.e. can have children
No members match the filter.
API & Jobs view
API & JobsEach property is a key in REST API responses and job payloads. Its name is the template getter without get, is or has. Methods that need arguments are not available here.
Properties 12
Read-only values on the record.
-
#
peopleCount -
int - Returns the total count of the people assigned to the group. Reads the all-groups aggregate deliberately: this is the groups listing's member-count column, and one grouped scan per request is cheaper there than a COUNT per row. A page that deals with a single group must use {@see getMemberCount()} instead -- same number, group-scoped query.
-
#
memberCount -
int - Returns the count of the people assigned to this one group. The single-group counterpart to {@see getPeopleCount()}: same number, but counted with a group-scoped query instead of read out of the all-groups aggregate, which scans the whole membership join table and holds a row per group in order to answer for one. Every page that deals with a single group must use this one. Memoised because a single group serialization can resolve it more than once: directly, and again through the select-support decision and the member-ID lookup on {@see \Users\Models\Backend\Group}.
-
#
id -
?int -
#
name -
?string -
#
text -
?string -
#
people -
?Collection<erson>
No members match the filter.
Admin view
AdminAvailable in cdna-admin templates. Copy an admin template into your site repository to change how this record is edited.
Properties 17
Take no arguments.
-
#
getPeopleCount() -
int - Returns the total count of the people assigned to the group. Reads the all-groups aggregate deliberately: this is the groups listing's member-count column, and one grouped scan per request is cheaper there than a COUNT per row. A page that deals with a single group must use {@see getMemberCount()} instead -- same number, group-scoped query.
-
#
getMemberCount() -
int - Returns the count of the people assigned to this one group. The single-group counterpart to {@see getPeopleCount()}: same number, but counted with a group-scoped query instead of read out of the all-groups aggregate, which scans the whole membership join table and holds a row per group in order to answer for one. Every page that deals with a single group must use this one. Memoised because a single group serialization can resolve it more than once: directly, and again through the select-support decision and the member-ID lookup on {@see \Users\Models\Backend\Response\Group}.
-
#
getId() -
?int -
#
getName() -
?string -
#
getText() -
?string -
#
getPeople() -
?Collection<erson> -
#
isHierarchicalModel()Not in API & Jobs -
bool - Check whether a model is a hierarchical model, i.e. can have children
-
#
getPeopleIds()Admin only -
array - Returns the IDs of the people assigned to the group. Exists so the group form's people select can be given plain IDs rather than the people collection. The select only ever needs the IDs, and iterating the collection to obtain them hydrates every Person entity behind it -- fatal on large groups. Returns nothing for a group whose membership the select cannot handle. The only caller reads this inside that same branch, so the guard costs the feature nothing, but it is what keeps the method safe everywhere else: the response model's
@methodline makes it a serialization key rather than mere documentation, so a group request that does not filter its properties would otherwise run an unbounded query for precisely the groups this exists to make loadable. Lives on the backend model rather than the shared one because it serves the group form alone. On the shared model the generator would publish it as a serialization key on the Api and Frontend response models too, where per .claude/rules/php-architecture.md § 7 it could never be withdrawn again. -
#
isPeopleSelectSupported()Admin only -
bool - Checks whether the group is small enough for its membership to be edited through the people select on the group form. Beyond the configured limit the select stops being usable rather than merely slow: it renders one hidden input per member, and the tree-select sends the whole selected-ID list as a query parameter on every dynamically loaded page, which the web server rejects once it grows large enough. Membership for such groups is managed from the people listing instead. Backend-only for the same reason as {@see getPeopleIds()}: the limit it reads is an admin-form setting, so the decision has no meaning on the Api or Frontend contracts.
No members match the filter.