Skip to content

Latest commit

 

History

History
1358 lines (651 loc) · 18.7 KB

Group.md

File metadata and controls

1358 lines (651 loc) · 18.7 KB

CBS\SmarterU\DataTypes\Group

Represents a SmarterU Group.

A group is a collection of users that can be collectively assigned to training.

Methods

Name Description
getCreatedDate Returns the date and time when the group was created.
getDashboardSetId Get the identifier of the dashboard set that is assigned to the group.
getDescription Returns the group's description.
getGroupId Returns the unique id of the group.
getHomeGroupMessage Returns the group's home message.
getLearningModuleCount Get the number of LearningModules assigned to the Group.
getLearningModules Get the container for assigning Learning Modules to the group.
getModifiedDate Returns the date and time the group was last modified.
getName Returns the name of the group.
getNotificationEmails Returns the group's notification email addresses.
getOldGroupId Get the group's old ID.
getOldName Get the group's old name.
getPermissions Get the User's permissions within the Group.
getStatus Returns the group's status.
getSubscriptionVariants Get the container for assigning subscription variants to the group.
getTags Returns the group's tags.
getUserCount Get the number of Users assigned to the Group.
getUserHelpEmail Get the email addresses to which help requests will be sent. If no email addresses are specified, the help requests will be sent to all administrators.
getUserHelpEnabled Get whether a link displays in the header of the learner interface that enables users who have the group as their home group to request help.
getUserHelpOverrideDefault Get whether the Enable User Help setting is overridden by the group.
getUserHelpText Get the text to display for the help link in the learner interface's header.
getUserLimitAmount Get the maximum number of users that can be added to the group. Null if there is no limit.
getUserLimitEnabled Get whether or not the group has a user limit enabled.
getUsers Get the container for assigning Users to the group.
setCreatedDate Sets the date and time when the group was created.
setDashboardSetId Set the identifier of the dashboard set that is assigned to the group.
setDescription Sets the group's description.
setGroupId Sets the unique id of the group.
setHomeGroupMessage Sets the group's home message.
setLearningModuleCount Set the number of LearningModules assigned to the Group.
setLearningModules Set the container for assigning Learning Modules to the group.
setModifiedDate Sets the date and time the group was last modified.
setName Sets the name of the group.
setNotificationEmails Sets the group's notification email addresses.
setOldGroupId Set the group's old ID.
setOldName Set the group's old name.
setPermissions Set the User's permissions within the Group.
setStatus Sets the group's status.
setSubscriptionVariants Set the container for assigning subscription variants to the group.
setTags Sets the group's tags.
setUserCount Set the number of Users assigned to the Group.
setUserHelpEmail Set the email addresses to which help requests will be sent. If no email addresses are specified, the help requests will be sent to all administrators.
setUserHelpEnabled Set whether a link displays in the header of the learner interface that enables users who have the group as their home group to request help.
setUserHelpOverrideDefault Set whether the Enable User Help setting is overridden by the group.
setUserHelpText Set the text to display for the help link in the learner interface's header.
setUserLimitAmount Set the maximum number of users that can be added to the group. Set this to null to remove the limit.
setUserLimitEnabled Set whether or not the group has a user limit enabled.
setUsers Set the container for assigning Users to the group.

Group::getCreatedDate

Description

public getCreatedDate (void)

Returns the date and time when the group was created.

Parameters

This function has no parameters.

Return Values

\DateTimeInterface

the date and time when the group was created.


Group::getDashboardSetId

Description

public getDashboardSetId (void)

Get the identifier of the dashboard set that is assigned to the group.

Parameters

This function has no parameters.

Return Values

?string

the identifier of the dashboard set


Group::getDescription

Description

public getDescription (void)

Returns the group's description.

Parameters

This function has no parameters.

Return Values

?string

the group's description.


Group::getGroupId

Description

public getGroupId (void)

Returns the unique id of the group.

Parameters

This function has no parameters.

Return Values

?string

the unique id of the group.


Group::getHomeGroupMessage

Description

public getHomeGroupMessage (void)

Returns the group's home message.

Parameters

This function has no parameters.

Return Values

?string

the group's home message.


Group::getLearningModuleCount

Description

public getLearningModuleCount (void)

Get the number of LearningModules assigned to the Group.

Parameters

This function has no parameters.

Return Values

int

the number of LearningModules.


Group::getLearningModules

Description

public getLearningModules (void)

Get the container for assigning Learning Modules to the group.

Parameters

This function has no parameters.

Return Values

array

the container for Learning Modules


Group::getModifiedDate

Description

public getModifiedDate (void)

Returns the date and time the group was last modified.

Parameters

This function has no parameters.

Return Values

\DateTimeInterface

the date and time the group was last modified.


Group::getName

Description

public getName (void)

Returns the name of the group.

Parameters

This function has no parameters.

Return Values

?string

the name of the group.


Group::getNotificationEmails

Description

public getNotificationEmails (void)

Returns the group's notification email addresses.

Parameters

This function has no parameters.

Return Values

string[]

the group's notification email addresses.


Group::getOldGroupId

Description

public getOldGroupId (void)

Get the group's old ID.

Parameters

This function has no parameters.

Return Values

?string

the old ID


Group::getOldName

Description

public getOldName (void)

Get the group's old name.

Parameters

This function has no parameters.

Return Values

?string

the old name


Group::getPermissions

Description

public getPermissions (void)

Get the User's permissions within the Group.

Parameters

This function has no parameters.

Return Values

string[]

The User's permissions within the Group.


Group::getStatus

Description

public getStatus (void)

Returns the group's status.

Parameters

This function has no parameters.

Return Values

?string

Returns the group's status.


Group::getSubscriptionVariants

Description

public getSubscriptionVariants (void)

Get the container for assigning subscription variants to the group.

Parameters

This function has no parameters.

Return Values

array

The container for subscription variants


Group::getTags

Description

public getTags (void)

Returns the group's tags.

Parameters

This function has no parameters.

Return Values

?\Tag[]

Returns the group's tags.


Group::getUserCount

Description

public getUserCount (void)

Get the number of Users assigned to the Group.

Parameters

This function has no parameters.

Return Values

int

the number of Users.


Group::getUserHelpEmail

Description

public getUserHelpEmail (void)

Get the email addresses to which help requests will be sent. If no email addresses are specified, the help requests will be sent to all administrators.

Parameters

This function has no parameters.

Return Values

?array

the email addresses to which help requests will be sent


Group::getUserHelpEnabled

Description

public getUserHelpEnabled (void)

Get whether a link displays in the header of the learner interface that enables users who have the group as their home group to request help.

Parameters

This function has no parameters.

Return Values

?bool

true if and only if the link is displayed


Group::getUserHelpOverrideDefault

Description

public getUserHelpOverrideDefault (void)

Get whether the Enable User Help setting is overridden by the group.

Parameters

This function has no parameters.

Return Values

?bool

true if and only if the Enable User Help setting is overridden by the group


Group::getUserHelpText

Description

public getUserHelpText (void)

Get the text to display for the help link in the learner interface's header.

Parameters

This function has no parameters.

Return Values

?string

the text to display for the help link


Group::getUserLimitAmount

Description

public getUserLimitAmount (void)

Get the maximum number of users that can be added to the group. Null if there is no limit.

Parameters

This function has no parameters.

Return Values

?int

The maximum number of users that can be added to a group, or null if there is no limit.


Group::getUserLimitEnabled

Description

public getUserLimitEnabled (void)

Get whether or not the group has a user limit enabled.

Parameters

This function has no parameters.

Return Values

?bool

true if and only if the group has a user limit enabled


Group::getUsers

Description

public getUsers (void)

Get the container for assigning Users to the group.

Parameters

This function has no parameters.

Return Values

array

the container for the Users


Group::setCreatedDate

Description

public setCreatedDate (\DateTimeImmutable $createdDate)

Sets the date and time when the group was created.

Parameters

  • (\DateTimeImmutable) $createdDate : the date and time when the group was created.

Return Values

self


Group::setDashboardSetId

Description

public setDashboardSetId (string $dashboardSetId)

Set the identifier of the dashboard set that is assigned to the group.

Parameters

  • (string) $dashboardSetId : The identifier of the dashboard set

Return Values

self


Group::setDescription

Description

public setDescription (string $description)

Sets the group's description.

Parameters

  • (string) $description : the group's description.

Return Values

self


Group::setGroupId

Description

public setGroupId (string $groupId)

Sets the unique id of the group.

Parameters

  • (string) $groupId : the unique id of the group.

Return Values

self


Group::setHomeGroupMessage

Description

public setHomeGroupMessage (string $homeGroupMessage)

Sets the group's home message.

Parameters

  • (string) $homeGroupMessage : the group's home message.

Return Values

self


Group::setLearningModuleCount

Description

public setLearningModuleCount (int $learningModuleCount)

Set the number of LearningModules assigned to the Group.

Parameters

  • (int) $learningModuleCount : the number of LearningModules

Return Values

self


Group::setLearningModules

Description

public setLearningModules (array $learningModules)

Set the container for assigning Learning Modules to the group.

Parameters

  • (array) $learningModules : the container for LearningModules

Return Values

self


Group::setModifiedDate

Description

public setModifiedDate (\DateTimeInterface $modifiedDate)

Sets the date and time the group was last modified.

Parameters

  • (\DateTimeInterface) $modifiedDate : The date and time the group was last modified.

Return Values

self


Group::setName

Description

public setName (string $name)

Sets the name of the group.

Parameters

  • (string) $name : the name of the group.

Return Values

self


Group::setNotificationEmails

Description

public setNotificationEmails (string[] $notificationEmails)

Sets the group's notification email addresses.

All members of the array must be strings. If they are not, then an InvalidArgumentException is thrown.

Parameters

  • (string[]) $notificationEmails : The Group's notification email addresses.

Return Values

self

Throws Exceptions

\InvalidArgumentException

if array members are not strings.


Group::setOldGroupId

Description

public setOldGroupId (?string $oldName)

Set the group's old ID.

Parameters

  • (?string) $oldName : the old ID

Return Values

self


Group::setOldName

Description

public setOldName (?string $oldName)

Set the group's old name.

Parameters

  • (?string) $oldName : the old name

Return Values

self


Group::setPermissions

Description

public setPermissions (string[] $permissions)

Set the User's permissions within the Group.

Parameters

  • (string[]) $permissions : The User's permissions within the Group

Return Values

self


Group::setStatus

Description

public setStatus (string $status)

Sets the group's status.

The status value must be one of STATUS_ACTIVE or STATUS_INACTIVE. If it is not a valid value, an InvalidArgumentException is thrown.

Parameters

  • (string) $status : The group's status.

Return Values

self

Throws Exceptions

\InvalidArgumentException

if status is invalid.


Group::setSubscriptionVariants

Description

public setSubscriptionVariants (array $)

Set the container for assigning subscription variants to the group.

Parameters

  • (array) $ : The container for subscription variants

Return Values

self


Group::setTags

Description

public setTags (\Tag[] $tags)

Sets the group's tags.

Parameters

  • (\Tag[]) $tags : The group's tags.

Return Values

self

Throws Exceptions

\InvalidArgumentException

if any array members are not a Tag.


Group::setUserCount

Description

public setUserCount (int $userCount)

Set the number of Users assigned to the Group.

Parameters

  • (int) $userCount : the number of Users

Return Values

self


Group::setUserHelpEmail

Description

public setUserHelpEmail (array $userHelpEmail)

Set the email addresses to which help requests will be sent. If no email addresses are specified, the help requests will be sent to all administrators.

Parameters

  • (array) $userHelpEmail : the email addresses

Return Values

self


Group::setUserHelpEnabled

Description

public setUserHelpEnabled (bool $)

Set whether a link displays in the header of the learner interface that enables users who have the group as their home group to request help.

Parameters

  • (bool) $ : userHelpEnabled true if and only if the link is displayed

Return Values

self


Group::setUserHelpOverrideDefault

Description

public setUserHelpOverrideDefault (bool $userHelpOverrideDefault)

Set whether the Enable User Help setting is overridden by the group.

Parameters

  • (bool) $userHelpOverrideDefault : true if and only if the Enable User Help setting is overridden by the group

Return Values

void


Group::setUserHelpText

Description

public setUserHelpText (string $userHelpText)

Set the text to display for the help link in the learner interface's header.

Parameters

  • (string) $userHelpText : the text to display for the help link

Return Values

self


Group::setUserLimitAmount

Description

public setUserLimitAmount (?int $userLimitAmount)

Set the maximum number of users that can be added to the group. Set this to null to remove the limit.

Parameters

  • (?int) $userLimitAmount : The maximum number of users that can be added to the group, or null if there is no maximum

Return Values

self


Group::setUserLimitEnabled

Description

public setUserLimitEnabled (bool $userLimitEnabled)

Set whether or not the group has a user limit enabled.

Parameters

  • (bool) $userLimitEnabled : true if and only if the group has a user limit enabled

Return Values

self


Group::setUsers

Description

public setUsers (array $users)

Set the container for assigning Users to the group.

Parameters

  • (array) $users : A container for assigning Users to the group. Each element must be an instance of CBS\SmarterU\DataTypes
    User.

Return Values

self