Class lispa\amos\community\controllers\CommunityController
Class CommunityController This is the class for controller "CommunityController".
Public Properties
Public Methods
Protected Methods
Method | Description | Defined By |
---|---|---|
baseListsAction() | Base operations in order to render different list views | lispa\amos\community\controllers\CommunityController |
findModel() | Finds the modelObj model based on its primary key value. | lispa\amos\core\controllers\CrudController |
genericFindModel() | lispa\amos\core\forms\editors\m2mWidget\controllers\M2MWidgetControllerTrait | |
getDefaultCurrentView() | lispa\amos\core\controllers\CrudController | |
getRedirectArray() | lispa\amos\core\forms\editors\m2mWidget\controllers\M2MWidgetControllerTrait | |
getRules() | lispa\amos\core\controllers\BaseController | |
redirectOnCreate() | lispa\amos\community\controllers\base\CommunityController | |
redirectOnUpdate() | lispa\amos\community\controllers\base\CommunityController | |
setListsBreadcrumbs() | Used to set page title and breadcrumbs. | lispa\amos\community\controllers\CommunityController |
setUserLanguage() | lispa\amos\core\controllers\AmosController |
Events
Event | Type | Description | Defined By |
---|---|---|---|
EVENT_AFTER_ACTION | yii\base\ActionEvent | An event raised right after executing a controller action. | yii\base\Controller |
EVENT_BEFORE_ACTION | yii\base\ActionEvent | An event raised right before executing a controller action. | yii\base\Controller |
Constants
Constant | Value | Description | Defined By |
---|---|---|---|
AFTER_FINDMODEL_EVENT | "afterFindModel" | lispa\amos\core\controllers\CrudController | |
BEFORE_FINDMODEL_EVENT | "beforeFindModel" | lispa\amos\core\controllers\CrudController |
Property Details
Method Details
Community manager accepts the user registration request to a community
public yii\web\Response actionAcceptUser ( $communityId, $userId ) | ||
$communityId | ||
$userId |
public string actionAdminAllCommunities ( ) |
public mixed actionAssociateCommunityM2m ( ) |
public void actionChangeUserRole ( $communityId, $userId ) | ||
$communityId | ||
$userId |
Participants to a community/workgroup m2m widget - Ajax call to redraw the widget
public string actionCommunityMembers ( $id, $classname, array $params ) | ||
$id | ||
$classname | ||
$params | array |
Participants to a community/workgroup m2m widget - Ajax call to redraw the widget
public string actionCommunityMembersMin ( $id, $classname, array $params ) | ||
$id | ||
$classname | ||
$params | array |
Action used to confirm a community manager.
public yii\web\Response actionConfirmManager ( $communityId, $userId, $managerRole ) | ||
$communityId | integer | |
$userId | integer | |
$managerRole | string |
/** Gets the list of all communities created by the logged user
public string actionCreatedByCommunities ( ) |
This action is called when a community is deleted.
public string|yii\web\Response actionDeletedCommunity ( $id ) | ||
$id | integer | |
throws | yii\web\NotFoundHttpException |
---|
This action increment the hits on a community.
public string actionIncrementCommunityHits ( $id ) | ||
$id | integer | |
throws | yii\web\NotFoundHttpException |
---|
Method to view all communities
public string actionIndex ( $layout = null ) | ||
$layout |
Associates user to a community if the user exists, If the user does not exists, creates it, sends credential mail and associate it to the community.
public boolean|string actionInsassM2m ( $id ) | ||
$id | integer |
|
Register an user in a community.
Checks if an user already joined a community: if true, a message informing the user is already registered in that community is sent, else registers the user in the community
public string actionJoinCommunity ( $communityId, $accept = false, $redirectAction = null ) | ||
$communityId | integer | |
$accept | boolean | |
$redirectAction |
Gets the list of all communities to which the logged user is registered
public string actionMyCommunities ( $id = null ) | ||
$id |
public void actionParticipants ( $communityId ) | ||
$communityId |
Publish a community
public string actionPublish ( $id, $redirectWizard = true ) | ||
$id | ||
$redirectWizard | boolean | True if publishing at the end of creation creation wizard, false otherwise |
Reject publication of a community - status returns to draft
public string actionReject ( $id ) | ||
$id |
Community manager rejects the user registration request to a community
public yii\web\Response actionRejectUser ( $communityId, $userId ) | ||
$communityId | integer | |
$userId | integer |
Gets the list of all communities to validate
public string actionToValidateCommunities ( ) |
Section Community Network (in edit or view mode) on user profile tab network
public string actionUserNetwork ( $userId, $isUpdate = false ) | ||
$userId | ||
$isUpdate | boolean |
public void afterAssociateM2m ( $event ) | ||
$event |
public void afterDeleteM2m ( $event ) | ||
$event |
public void afterManageAttributesM2m ( $event ) | ||
$event |
Base operations in order to render different list views
protected string baseListsAction ( $pageTitle, $layout = null ) | ||
$pageTitle | ||
$layout |
public void beforeAssociateM2m ( $event ) | ||
$event |
public void beforeCancelAssociateM2m ( $event ) | ||
$event |
public void beforeDeleteM2m ( $event ) | ||
$event |
public array behaviors ( ) |
public void init ( ) | ||
throws | yii\base\InvalidConfigException |
---|
public void sendMail ( $from, $to, $subject, $text, $files, $bcc ) | ||
$from | string | |
$to | string | |
$subject | string | |
$text | string | |
$files | array | |
$bcc | array |
public setCommunityById ( $id ) | ||
$id |
Used to set page title and breadcrumbs.
protected void setListsBreadcrumbs ( $pageTitle ) | ||
$pageTitle | string | Page title (ie. Created by, ...) |