Class humhub\modules\live\Module
Inheritance | humhub\modules\live\Module » humhub\components\Module » yii\base\Module |
---|---|
Available since version | 1.2 |
Live module provides a live channel to the users browser.
Public Properties
Property | Type | Description | Defined By |
---|---|---|---|
$isCoreModule | humhub\modules\live\Module | ||
$legitimateCachePrefix | string | Cache prefix for legitimate content container ids by user | humhub\modules\live\Module |
$resourcesPath | string | The path for module resources (images, javascripts) Also module related assets like README. | humhub\components\Module |
Public Methods
Method | Description | Defined By |
---|---|---|
afterUpdate() | Called right after the module update. | humhub\components\Module |
beforeUpdate() | Called right before the module is updated. | humhub\components\Module |
disable() | Disables a module | humhub\components\Module |
enable() | Enables this module | humhub\components\Module |
getActivityClasses() | Returns a list of activity class names this modules provides. | humhub\components\Module |
getAssetClasses() | Returns a list of asset class names this modules provides. | humhub\components\Module |
getAssetPath() | humhub\components\Module | |
getAssetsUrl() | Get Assets Url | humhub\components\Module |
getConfigUrl() | URL to the module's configuration action | humhub\components\Module |
getDescription() | Returns modules description provided by module.json file | humhub\components\Module |
getImage() | Returns image url for this module
Place your modules image in |
humhub\components\Module |
getLegitimateContentContainerIds() | Returns an array of content container ids which belongs to the given user. | humhub\modules\live\Module |
getName() | Returns modules name provided by module.json file | humhub\components\Module |
getNotifications() | Returns a list of notification classes this module provides. | humhub\components\Module |
getPermissions() | Returns a list of permission objects this module provides. | humhub\components\Module |
getPublishedUrl() | Returns the url of an asset file and publishes all module assets if the file is not published yet. | humhub\components\Module |
getVersion() | Returns modules version number provided by module.json file | humhub\components\Module |
hasNotifications() | Determines whether the module has notification classes or not | humhub\components\Module |
init() | humhub\components\Module | |
isPublished() | Checks if a specific asset file has already been published | humhub\components\Module |
migrate() | Execute all not applied module migrations | humhub\components\Module |
publishAssets() | Publishes the basePath/resourcesPath (assets) module directory if existing. | humhub\components\Module |
refreshLegitimateContentContainerIds() | humhub\modules\live\Module | |
update() | This method is called after an update is performed. | humhub\components\Module |
Protected Methods
Method | Description | Defined By |
---|---|---|
getModuleInfo() | Reads module.json which contains basic module information and returns it as array | humhub\components\Module |
Property Details
Cache prefix for legitimate content container ids by user
Method Details
Returns an array of content container ids which belongs to the given user.
There are three separeted lists by visibility level:
- Content::VISIBILITY_PUBLIC [1,2,3,4] (Public visibility only)
- Content::VISIBILITY_PRIVATE [5,6,7] (Public and private visibility)
- Content::VISIBILITY_OWNER (10) (No visibility, direct to the user)
public array getLegitimateContentContainerIds ( humhub\modules\user\models\User $user, $cached = true ) | ||
$user | humhub\modules\user\models\User | The User |
$cached | boolean | Use caching |
return | array | Multi dimensional array of user content container ids |
---|
public void refreshLegitimateContentContainerIds ( humhub\modules\user\models\User $user ) | ||
$user |