Class kartik\tree\controllers\NodeController
Inheritance | kartik\tree\controllers\NodeController » yii\web\Controller |
---|
Public Properties
Property | Type | Description | Defined By |
---|---|---|---|
$boolKeys | array | The list of keys in $_POST which must be cast as boolean | kartik\tree\controllers\NodeController |
Public Methods
Method | Description | Defined By |
---|---|---|
actionManage() | View, create, or update a tree node via ajax | kartik\tree\controllers\NodeController |
actionMove() | Move a tree node | kartik\tree\controllers\NodeController |
actionRemove() | Remove a tree node | kartik\tree\controllers\NodeController |
actionSave() | Saves a node once form is submitted | kartik\tree\controllers\NodeController |
process() | Processes a code block and catches exceptions | kartik\tree\controllers\NodeController |
Protected Methods
Method | Description | Defined By |
---|---|---|
checkValidRequest() | Checks if request is valid and throws exception if invalid condition is true | kartik\tree\controllers\NodeController |
getPostData() | Gets the data from $_POST after parsing boolean values | kartik\tree\controllers\NodeController |
Property Details
The list of keys in $_POST which must be cast as boolean
Method Details
View, create, or update a tree node via ajax
public string actionManage ( ) | ||
return | string | Json encoded response |
---|
Move a tree node
public void actionMove ( ) |
Remove a tree node
public void actionRemove ( ) |
Saves a node once form is submitted
public void actionSave ( ) |
Checks if request is valid and throws exception if invalid condition is true
protected static void checkValidRequest ( $isInvalid = null ) | ||
$isInvalid | bool | Whether the request is invalid |
throws | \yii\base\InvalidCallException |
---|
Gets the data from $_POST after parsing boolean values
protected static array getPostData ( ) |
Processes a code block and catches exceptions
public static array process ( $callback, $msgError, $msgSuccess ) | ||
$callback | \kartik\tree\controllers\Closure | The function to execute (this returns a valid |
$msgError | string | The default error message to return |
$msgSuccess | string | The default success error message to return |
return | array | Outcome of the code consisting of following keys:
|
---|