class TeamTeam entity: mirrors core post fields plus team meta (code, roster, flags, etc.).
class
- Full name
Kernowdev\Clanbite\Extensions\Teams\Team
Methods
delete()Trash or delete via the store.exists()Whether this team corresponds to a saved post.get_accept_challenges()Whether this team accepts match challenges from other teams.get_allow_ban_players()Whether managers can ban players.get_allow_frontend_edit()Whether the team can be edited on the front end.get_allow_invites()Whether members can be invited.get_author_id()Owner user ID (post_author).get_avatar_id()Team avatar attachment ID.get_code()Team code meta.get_country()ISO country code (optional).get_cover_id()Team cover attachment ID.get_description()Post content (description / bio HTML).get_draws()Get the draw count.get_id()WordPress post ID.get_join_mode()Join mode option (validated elsewhere when persisting from admin/extension).get_losses()Get the loss count.get_member_roles()Raw roster map from storage (user ID => role slug).get_motto()Team motto meta.get_name()Post title (team name).get_permalink()Public permalink for this team, or empty string if unsaved.get_slug()Post slug (post_name).get_status()Post status (e.g. publish, draft).get_wins()Get the win count.save()Create or update via the given store (create when ID is 0, else update).set_accept_challenges()Set whether other teams can challenge this team.set_allow_ban_players()Set whether managers can ban players.set_allow_frontend_edit()Set whether the team can be edited on the front end.set_allow_invites()Set whether members can be invited.set_author_id()Set the team owner user ID (post author).set_avatar_id()Set the avatar attachment ID.set_code()Set the short team code.set_country()Set the ISO country code (sanitized as text).set_cover_id()Set the cover attachment ID.set_description()Set the team description (post content).set_draws()Set the draw count (negative values are clamped to 0).set_id()Set post ID (normally only used by a data store after insert).set_join_mode()Set the join mode slug.set_losses()Set the loss count (negative values are clamped to 0).set_member_roles()Replace the in-memory roster map (IDs coerced to positive integers).set_motto()Set the team motto.set_name()Set the team name (post title).set_slug()Set the team slug (post name).set_status()Set the team post status.set_wins()Set the win count (negative values are clamped to 0).
Defined in inc/extensions/teams/class-team.php