yii2-workflow Class Reference
  • Namespace
  • Class

Namespaces

  • raoul2000
    • workflow
      • actions
      • base
      • events
      • helpers
      • source
        • file
      • validation

Classes

  • ChangeStatusAction

Class ChangeStatusAction

Action change status Workflow

yii\base\Action
Extended by raoul2000\workflow\actions\ChangeStatusAction
Namespace: raoul2000\workflow\actions
Author: Angel (Faryshta) Guevara aguevara@tecnocen.com
Author: Carlos (neverabe) Llamosas carlos@tecnocen.com
Author: Alejandro (seether69) Marquez amarquez@tecnocen.com
Located at actions/ChangeStatusAction.php

Methods summary

public
# init( )

Inheritdoc

public closure
# run( integer $id, string $status )

Runs this action with the specified parameters. This method is mainly invoked by the controller

Runs this action with the specified parameters. This method is mainly invoked by the controller

Parameters

$id
Id of model to find
$status
status will change

Returns

closure
object Preconfigured response
protected The
# findModel( integer $id )

Finds the model based on its primary key value. If the model is not found, a 404 HTTP exception will be thrown.

Finds the model based on its primary key value. If the model is not found, a 404 HTTP exception will be thrown.

Parameters

$id

Returns

The
loaded model

Throws

NotFoundHttpException
if the model cannot be found
protected closure
# response( boolean $changedStatus, object $model )

Function preconfigured response

Function preconfigured response

Parameters

$changedStatus
if status changed
$model
Model in the response

Returns

closure
object preconfigured response

Properties summary

public callable $findModel

used to find the model to be updated.

Must have signature

function ($id);

Where - id: mixed the param to be searched as model.

and returns an ActiveRecord instance. or throw yii\web\HttpException

used to find the model to be updated.

Must have signature

function ($id);

Where - id: mixed the param to be searched as model.

and returns an ActiveRecord instance. or throw yii\web\HttpException

#
public callable $response

method to handle the response for the user.

Must have signature

function ($changedStatus, $model)

Where - $changedStatus: boolean if the status were changed correctly - $model: ActiveRecord the model which was updated.

With a mixed return depending on the controller.

method to handle the response for the user.

Must have signature

function ($changedStatus, $model)

Where - $changedStatus: boolean if the status were changed correctly - $model: ActiveRecord the model which was updated.

With a mixed return depending on the controller.

#
yii2-workflow Class Reference API documentation generated by ApiGen