\Vegas\Mvc\ControllerCrud

Class Crud

Summary

Methods
Properties
Constants
initialize()
newAction()
createAction()
editAction()
updateAction()
deleteAction()
No public properties found
No constants found
jsonResponse()
_()
throw403()
throw404()
throw500()
checkRequest()
$successMessage
$formName
$modelName
N/A
No private methods found
No private properties found
N/A

Properties

$successMessage

$successMessage : string

Default success message

Type

string

$formName

$formName : string

Form class name

Type

string

$modelName

$modelName : string

Model class name

Type

string

Methods

initialize()

initialize()

Initializes scaffolding

Throws

\Vegas\Mvc\Controller\Crud\Exception\NotConfiguredException

newAction()

newAction()

Displays form for new record

createAction()

createAction()

Creates new record

editAction()

editAction( $id)

Displays form for existing record

Parameters

$id

updateAction()

updateAction( $id)

Updates existing record indicated by its ID

Parameters

$id

deleteAction()

deleteAction( $id)

Deletes existing record by its ID

Parameters

$id

jsonResponse()

jsonResponse( $data) : \Phalcon\Http\ResponseInterface

Renders JSON response Disables view

Parameters

$data

Returns

\Phalcon\Http\ResponseInterface

_()

_(mixed $text) : string

_ Alias for $this->i18n->_().

Returns translated text.

Parameters

mixed $text

Returns

string

throw403()

throw403(string $message)

Throws exception with code 403

Parameters

string $message

Throws

\Vegas\Exception

throw404()

throw404(string $message)

Throws exception with code 404

Parameters

string $message

Throws

\Vegas\Exception

throw500()

throw500(string $message)

Throws exception with code 500

Parameters

string $message

Throws

\Vegas\Exception

checkRequest()

checkRequest()

Checks if request was send using POST method

Throws

\Vegas\Mvc\Controller\Crud\Exception\PostRequiredException