Ubiquity 2.5.2
php rapid development framework
Loading...
Searching...
No Matches
CRUDDatas Class Reference

The base class for displaying datas in CRUD controllers Ubiquity\controllers\crud$CRUDDatas This class is part of Ubiquity. More...

Public Member Functions

 __construct ($controller)
 
 getTableNames ()
 Returns the table names to display in the left admin menu.
 
 getFieldNames (string $model)
 Returns the fields to display in the showModel action for $model (DataTable)
 
 getFormFieldNames (string $model, $instance)
 Returns the fields to update in the edit an new action for $model.
 
 getSearchFieldNames (string $model)
 Returns the fields to use in search queries.
 
 getElementFieldNames (string $model)
 Returns the fields for displaying an instance of $model (DataElement)
 
 getManyToManyDatas ($fkClass, $instance, $member)
 Returns a (filtered) list of $fkClass objects to display in an html list.
 
 getManyToOneDatas ($fkClass, $instance, $member)
 Returns a list (filtered) of $fkClass objects to display in an html list.
 
 getOneToManyDatas ($fkClass, $instance, $member)
 Returns a list (filtered) of $fkClass objects to display in an html list.
 
 getUpdateOneToManyInForm ()
 
 getUpdateManyToManyInForm ()
 
 getUpdateManyToOneInForm ()
 
 refreshPartialInstance ()
 Defines whether the refresh is partial or complete after an instance update.
 
 _getInstancesFilter (string $model)
 Adds a condition for filtering the instances displayed in dataTable Return 1=1 by default.
 

Protected Attributes

 $controller
 

Detailed Description

The base class for displaying datas in CRUD controllers Ubiquity\controllers\crud$CRUDDatas This class is part of Ubiquity.

Author
jc
Version
1.0.0

Definition at line 17 of file CRUDDatas.php.

Constructor & Destructor Documentation

◆ __construct()

__construct (   $controller)

Definition at line 21 of file CRUDDatas.php.

Member Function Documentation

◆ _getInstancesFilter()

_getInstancesFilter ( string  $model)

Adds a condition for filtering the instances displayed in dataTable Return 1=1 by default.

Parameters
string$model
Returns
string

Definition at line 149 of file CRUDDatas.php.

◆ getElementFieldNames()

getElementFieldNames ( string  $model)

Returns the fields for displaying an instance of $model (DataElement)

Parameters
string$model
Returns
array

Definition at line 69 of file CRUDDatas.php.

◆ getFieldNames()

getFieldNames ( string  $model)

Returns the fields to display in the showModel action for $model (DataTable)

Parameters
string$model
Returns
array

Definition at line 38 of file CRUDDatas.php.

◆ getFormFieldNames()

getFormFieldNames ( string  $model,
  $instance 
)

Returns the fields to update in the edit an new action for $model.

Parameters
string$model
object$instance
Returns
array

Definition at line 49 of file CRUDDatas.php.

◆ getManyToManyDatas()

getManyToManyDatas (   $fkClass,
  $instance,
  $member 
)

Returns a (filtered) list of $fkClass objects to display in an html list.

Parameters
string$fkClass
object$instance
string$memberThe member associated with a manyToMany relation
Returns
array

Definition at line 81 of file CRUDDatas.php.

◆ getManyToOneDatas()

getManyToOneDatas (   $fkClass,
  $instance,
  $member 
)

Returns a list (filtered) of $fkClass objects to display in an html list.

Parameters
string$fkClass
object$instance
string$memberThe member associated with a manyToOne relation
Returns
array

Definition at line 93 of file CRUDDatas.php.

◆ getOneToManyDatas()

getOneToManyDatas (   $fkClass,
  $instance,
  $member 
)

Returns a list (filtered) of $fkClass objects to display in an html list.

Parameters
string$fkClass
object$instance
string$memberThe member associated with a oneToMany relation
Returns
array

Definition at line 105 of file CRUDDatas.php.

◆ getSearchFieldNames()

getSearchFieldNames ( string  $model)

Returns the fields to use in search queries.

Parameters
string$model
Returns
array

Definition at line 59 of file CRUDDatas.php.

◆ getTableNames()

getTableNames ( )

Returns the table names to display in the left admin menu.

Definition at line 28 of file CRUDDatas.php.

◆ getUpdateManyToManyInForm()

getUpdateManyToManyInForm ( )
Returns
boolean

Definition at line 121 of file CRUDDatas.php.

◆ getUpdateManyToOneInForm()

getUpdateManyToOneInForm ( )
Returns
boolean

Definition at line 129 of file CRUDDatas.php.

◆ getUpdateOneToManyInForm()

getUpdateOneToManyInForm ( )
Returns
boolean

Definition at line 113 of file CRUDDatas.php.

◆ refreshPartialInstance()

refreshPartialInstance ( )

Defines whether the refresh is partial or complete after an instance update.

Returns
boolean

Definition at line 138 of file CRUDDatas.php.

Field Documentation

◆ $controller

$controller
protected

Definition at line 19 of file CRUDDatas.php.


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