Class lispa\amos\news\controllers\NewsController
Class NewsController
NewsController implements the CRUD actions for News 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 | |
setListViewsParams() | This method is useful to set all common params for all list views. | lispa\amos\news\controllers\NewsController |
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
public string actionAdminAllNews ( $currentView = null ) | ||
$currentView | null |
Action for search all news.
public string actionAllNews ( $currentView = null ) | ||
$currentView |
Creates a new News model.
If creation is successful, the browser will be redirected to the 'view' page.
public mixed actionCreate ( ) |
Deletes an existing News model.
If deletion is successful, the browser will be redirected to the 'index' page.
public mixed actionDelete ( $id ) | ||
$id | integer |
Lists all the validated news.
public string actionIndex ( $layout = NULL ) | ||
$layout |
Action for search all validated news.
public string actionNotizie ( ) |
Action for search all news.
public string actionOwnInterestNews ( $currentView = null ) | ||
$currentView |
Action to search only for their news
public string actionOwnNews ( $currentView = null ) | ||
$currentView |
public yii\web\Response actionRejectNews ( $id ) | ||
$id | integer | News id. |
Action to search to validate news.
public string actionToValidateNews ( ) |
Updates an existing News model.
public mixed actionUpdate ( $id, $backToEditStatus = false ) | ||
$id | integer | |
$backToEditStatus | boolean|false | Save the model with status Editing in progress before form rendering |
public yii\web\Response actionValidateNews ( $id ) | ||
$id | integer | News id. |
Displays a single News model.
public mixed actionView ( $id ) | ||
$id | integer |
Declares external actions for the controller.
This method is meant to be overwritten to declare external actions for the controller. It should return an array, with array keys being action IDs, and array values the corresponding action class names or action configuration arrays. For example,
return [
'action1' => 'app\components\Action1',
'action2' => [
'class' => 'app\components\Action2',
'property1' => 'value1',
'property2' => 'value2',
],
];
Yii::createObject() will be used later to create the requested action using the configuration provided here.
public void actions ( ) |
public array behaviors ( ) |
public void init ( ) | ||
throws | yii\base\InvalidConfigException |
---|
public void setDaValidareStatus ( $model, $redirect ) | ||
$model | ||
$redirect |
This method is useful to set all common params for all list views.
protected void setListViewsParams ( ) |
public void setNetworkDashboardBreadcrumb ( ) |