Ubiquity  2.0.3
php rapid development framework
CRUDController Class Reference
+ Inheritance diagram for CRUDController:

Public Member Functions

 index ()
 Default page : list all objects. More...
 
 _getInstancesFilter ($model)
 
 refresh_ ()
 
 edit ($modal="no", $ids="")
 Edits an instance. More...
 
 newModel ($modal="no")
 Adds a new instance and edits it. More...
 
 display ($modal="no", $ids="")
 Displays an instance. More...
 
 delete ($ids)
 Deletes an instance. More...
 
 refreshTable ($id=null)
 
 update ()
 Updates an instance from the data posted in a form. More...
 
 showDetail ($ids)
 Shows associated members with foreign keys. More...
 
 detailClick ($url)
 
 _getAdminData ()
 
- Public Member Functions inherited from ControllerBase
 initialize ()
 
 finalize ()
 
- Public Member Functions inherited from Controller
 index ()
 Default action. More...
 
 __construct ()
 Constructor initialize $view variable. More...
 
 initialize ()
 Method called before each action Can be override in derived class. More...
 
 finalize ()
 Method called after each action Can be override in derived class. More...
 
 loadView ($viewName, $pData=NULL, $asString=false)
 Loads the view $viewName possibly passing the variables $pdata. More...
 
 loadDefaultView ($pData=NULL, $asString=false)
 Loads the default view (controllerName/actionName) possibly passing the variables $pdata. More...
 
 getDefaultViewName ()
 Returns the default view name for this controller/action i.e ControllerName/actionName.html for the action actionName in ControllerName. More...
 
 isValid ($action)
 Returns True if access to the controller is allowed To be override in sub classes. More...
 
 onInvalidControl ()
 Called if isValid () returns false
To be override in sub classes. More...
 
 forward ($controller, $action="index", $params=array(), $initialize=false, $finalize=false)
 Loads the controller $controller and calls its $action method by passing the parameters $params. More...
 
 redirectToRoute ($routeName, $parameters=[], $initialize=false, $finalize=false)
 Redirect to a route by its name. More...
 
 getView ()
 
- Public Member Functions inherited from MessagesTrait
 _getModelViewer ()
 
 showSimpleMessage ($content, $type, $title=null, $icon="info", $timeout=NULL, $staticName=null)
 
 showConfMessage ($content, $type, $title, $url, $responseElement, $data, $attributes=NULL)
 
- Public Member Functions inherited from HasModelViewerInterface
 _getBaseRoute ()
 

Protected Member Functions

 getInstances ($page=1, $id=null)
 
 search ($model, $search)
 
 _edit ($instance, $modal="no")
 
 _showModel ($id=null)
 
 refreshInstance ($instance, $isNew)
 
 getAdminData ()
 To override for defining a new adminData. More...
 
 getModelViewer ()
 To override for defining a new ModelViewer. More...
 
 getFiles ()
 To override for changing view files. More...
 
 getEvents ()
 To override for changing events. More...
 
- Protected Member Functions inherited from MessagesTrait
 _showSimpleMessage (CRUDMessage $message, $staticName=null)
 
 _showConfMessage (CRUDMessage $message, $url, $responseElement, $data, $attributes=NULL)
 

Protected Attributes

 $model
 
 $modelViewer
 
 $events
 
 $crudFiles
 
 $adminDatas
 
 $activePage
 
- Protected Attributes inherited from ControllerBase
 $headerView ="@framework/main/vHeader.html"
 
 $footerView ="@framework/main/vFooter.html"
 
- Protected Attributes inherited from Controller
 $view
 

Private Member Functions

 getModelInstance ($ids)
 
 _getModelViewer ()
 
 _getFiles ()
 
 _getEvents ()
 
 getSingleton ($value, $method)
 
 crudLoadView ($viewName, $vars=[])
 

Detailed Description

Definition at line 17 of file CRUDController.php.

Member Function Documentation

◆ _edit()

_edit (   $instance,
  $modal = "no" 
)
protected

Definition at line 133 of file CRUDController.php.

◆ _getAdminData()

_getAdminData ( )

Implements HasModelViewerInterface.

Definition at line 310 of file CRUDController.php.

◆ _getEvents()

_getEvents ( )
private

Definition at line 346 of file CRUDController.php.

◆ _getFiles()

_getFiles ( )
private

Definition at line 334 of file CRUDController.php.

◆ _getInstancesFilter()

_getInstancesFilter (   $model)

Implements HasModelViewerInterface.

Definition at line 51 of file CRUDController.php.

◆ _getModelViewer()

_getModelViewer ( )
private

Definition at line 322 of file CRUDController.php.

◆ _showModel()

_showModel (   $id = null)
protected

Definition at line 154 of file CRUDController.php.

◆ crudLoadView()

crudLoadView (   $viewName,
  $vars = [] 
)
private

Definition at line 357 of file CRUDController.php.

◆ delete()

delete (   $ids)

Deletes an instance.

Parameters
mixed$ids

Definition at line 165 of file CRUDController.php.

◆ detailClick()

detailClick (   $url)

Definition at line 285 of file CRUDController.php.

◆ display()

display (   $modal = "no",
  $ids = "" 
)

Displays an instance.

Parameters
string$modal
string$ids

Definition at line 117 of file CRUDController.php.

◆ edit()

edit (   $modal = "no",
  $ids = "" 
)

Edits an instance.

Parameters
string$modalAccept "no" or "modal" for a modal dialog
string$idsthe primary value(s)

Definition at line 86 of file CRUDController.php.

◆ getAdminData()

getAdminData ( )
protected

To override for defining a new adminData.

Returns
CRUDDatas

Definition at line 306 of file CRUDController.php.

◆ getEvents()

getEvents ( )
protected

To override for changing events.

Returns
CRUDEvents

Definition at line 342 of file CRUDController.php.

◆ getFiles()

getFiles ( )
protected

To override for changing view files.

Returns
CRUDFiles

Definition at line 330 of file CRUDController.php.

◆ getInstances()

getInstances (   $page = 1,
  $id = null 
)
protected

Definition at line 36 of file CRUDController.php.

◆ getModelInstance()

getModelInstance (   $ids)
private

Definition at line 289 of file CRUDController.php.

◆ getModelViewer()

getModelViewer ( )
protected

To override for defining a new ModelViewer.

Returns
ModelViewer

Definition at line 318 of file CRUDController.php.

◆ getSingleton()

getSingleton (   $value,
  $method 
)
private

Definition at line 350 of file CRUDController.php.

◆ index()

index ( )

Default page : list all objects.

Definition at line 28 of file CRUDController.php.

◆ newModel()

newModel (   $modal = "no")

Adds a new instance and edits it.

Parameters
string$modalAccept "no" or "modal" for a modal dialog

Definition at line 100 of file CRUDController.php.

◆ refresh_()

refresh_ ( )

Definition at line 61 of file CRUDController.php.

◆ refreshInstance()

refreshInstance (   $instance,
  $isNew 
)
protected

Definition at line 237 of file CRUDController.php.

◆ refreshTable()

refreshTable (   $id = null)

Definition at line 202 of file CRUDController.php.

◆ search()

search (   $model,
  $search 
)
protected

Definition at line 55 of file CRUDController.php.

◆ showDetail()

showDetail (   $ids)

Shows associated members with foreign keys.

Parameters
mixed$ids

Definition at line 250 of file CRUDController.php.

◆ update()

update ( )

Updates an instance from the data posted in a form.

Definition at line 211 of file CRUDController.php.

Field Documentation

◆ $activePage

$activePage
protected

Definition at line 23 of file CRUDController.php.

◆ $adminDatas

$adminDatas
protected

Definition at line 22 of file CRUDController.php.

◆ $crudFiles

$crudFiles
protected

Definition at line 21 of file CRUDController.php.

◆ $events

$events
protected

Definition at line 20 of file CRUDController.php.

◆ $model

$model
protected

Definition at line 18 of file CRUDController.php.

◆ $modelViewer

$modelViewer
protected

Definition at line 19 of file CRUDController.php.


The documentation for this class was generated from the following file: