Group extends Entity
Table of Contents
Constants
- ENTITY_TYPE_LANDING = 'L'
- Entity type 'LANDING'.
- ENTITY_TYPE_SITE = 'S'
- Entity type 'SITE'.
- ROLE_TYPE = 'GROUP'
- Type of role for group's type.
Methods
- __construct() : mixed
- Entity constructor.
- bindLanding() : bool
- Bind landing for current entity.
- bindSite() : bool
- Bind site for current entity.
- getList() : array<string|int, mixed>
- Returns binding list of entities by specified binding type.
- getSiteIdByGroupId() : int|null
- By group id returns binding site id.
- isForbiddenBindingAction() : bool
- onSiteChange() : void
- Call when site was changed (title, url, or 'delete' flag).
- rebindSite() : bool
- Refreshes binding of site.
- recognizeSiteTitle() : array<string|int, mixed>
- Accepts array with site data and replaces site title to group title.
- unbindLanding() : bool
- Unbind landing for current entity.
- unbindSite() : bool
- Unbind site for current entity.
Constants
ENTITY_TYPE_LANDING
Entity type 'LANDING'.
public
mixed
ENTITY_TYPE_LANDING
= 'L'
ENTITY_TYPE_SITE
Entity type 'SITE'.
public
mixed
ENTITY_TYPE_SITE
= 'S'
ROLE_TYPE
Type of role for group's type.
public
mixed
ROLE_TYPE
= 'GROUP'
Methods
__construct()
Entity constructor.
public
__construct(mixed $code) : mixed
Parameters
- $code : mixed
-
Binding code.
bindLanding()
Bind landing for current entity.
public
bindLanding(int $landingId) : bool
Parameters
- $landingId : int
-
Landing id.
Return values
boolbindSite()
Bind site for current entity.
public
bindSite(int $siteId) : bool
Parameters
- $siteId : int
-
Site id.
Return values
boolgetList()
Returns binding list of entities by specified binding type.
public
static getList([mixed $code = null ]) : array<string|int, mixed>
Parameters
- $code : mixed = null
-
Binding code.
Return values
array<string|int, mixed>getSiteIdByGroupId()
By group id returns binding site id.
public
static getSiteIdByGroupId(int $groupId) : int|null
Parameters
- $groupId : int
-
Group id.
Return values
int|nullisForbiddenBindingAction()
public
isForbiddenBindingAction() : bool
Return values
boolonSiteChange()
Call when site was changed (title, url, or 'delete' flag).
public
static onSiteChange(int $siteId) : void
Parameters
- $siteId : int
-
Site id.
rebindSite()
Refreshes binding of site.
public
rebindSite(int $siteId) : bool
Parameters
- $siteId : int
-
Site id.
Return values
boolrecognizeSiteTitle()
Accepts array with site data and replaces site title to group title.
public
static recognizeSiteTitle(array<string|int, mixed> $input) : array<string|int, mixed>
Parameters
- $input : array<string|int, mixed>
-
Site data ([ID] at least).
Return values
array<string|int, mixed>unbindLanding()
Unbind landing for current entity.
public
unbindLanding(int $landingId) : bool
Parameters
- $landingId : int
-
Landing id.
Return values
boolunbindSite()
Unbind site for current entity.
public
unbindSite(int $siteId) : bool
Parameters
- $siteId : int
-
Site id.