Class lispa\amos\community\controllers\base\CommunityController
Class CommunityController CommunityController implements the CRUD actions for Community model.
Public Properties
Public Methods
Protected Methods
Method | Description | Defined By |
---|---|---|
findModel() | Finds the modelObj model based on its primary key value. | lispa\amos\core\controllers\CrudController |
getDefaultCurrentView() | lispa\amos\core\controllers\CrudController | |
getRules() | lispa\amos\core\controllers\BaseController | |
redirectOnCreate() | lispa\amos\community\controllers\base\CommunityController | |
redirectOnUpdate() | lispa\amos\community\controllers\base\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
Creates a new Community model.
If creation is successful, the browser will be redirected to the 'view' page.
public mixed actionCreate ( ) |
Creates a new Community model by ajax request.
If creation is successful, the browser will be redirected to the 'view' page.
public mixed actionCreateAjax ( $fid, $dataField ) | ||
$fid | ||
$dataField |
Deletes an existing Community model.
If deletion is successful, the browser will be redirected to the 'index' page. in Community model beforeDelete is overwritten to allow deletion of related models
See also lispa\amos\community\models\Community::beforeDelete().
public mixed actionDelete ( $id, $communityParentId = null ) | ||
$id | integer | |
$communityParentId |
Lists all Community models.
public mixed actionIndex ( $layout = NULL ) | ||
$layout |
Updates an existing Community model.
If update is successful, the browser will be redirected to the 'view' page.
public string|yii\web\Response actionUpdate ( $id, $visibleOnEdit = false, $tabActive = null ) | ||
$id | integer | |
$visibleOnEdit | boolean | |
$tabActive | string |
Displays a single Community model.
public mixed actionView ( $id, $tabActive = null ) | ||
$id | integer | |
$tabActive | ||
throws | yii\web\NotFoundHttpException |
---|
public void init ( ) | ||
throws | yii\base\InvalidConfigException |
---|
protected yii\web\Response redirectOnCreate ( $model ) | ||
$model |
protected yii\web\Response redirectOnUpdate ( $model, $previousStatus = null ) | ||
$model | ||
$previousStatus | null |