phpMv
-UI toolkit 2.4.12
jQuery, jQuery UI, Twitter Bootstrap and Semantic-UI library for php & php MVC Frameworks
|
DataTable widget for displaying list of objects. More...
Public Member Functions | |
__construct ($identifier, $model, $modelInstance=NULL) | |
run (JsUtils $js) | |
refreshTR () | |
refreshTD ($fieldName, $jquery, $view) | |
compile (JsUtils $js=NULL, &$view=NULL) | |
getFieldValue ($index) | |
afterCompile ($index, $callback) | |
Associates a $callback function after the compilation of the field at $index position The $callback function can take the following arguments : $field=>the compiled field, $instance : the active instance of the object, $index: the field position. More... | |
getHtmlComponent () | |
{} More... | |
getUrls () | |
setUrls ($urls) | |
Sets the associative array of urls for refreshing, updating or deleting think of defining the update zone with the setTargetSelector method. More... | |
paginate ($page, $total_rowcount, $items_per_page=10, $pages_visibles=null) | |
Paginates the DataTable element with a Semantic HtmlPaginationMenu component. More... | |
autoPaginate ($page=1, $items_per_page=10, $pages_visibles=4) | |
Auto Paginates the DataTable element with a Semantic HtmlPaginationMenu component. More... | |
refresh ($compileParts=[ 'tbody']) | |
addSearchInToolbar ($position=Direction::RIGHT) | |
Adds a search input in toolbar. More... | |
getSearchField () | |
onNewRow ($callback) | |
The callback function called after the insertion of each row when fromDatabaseObjects is called callback function takes the parameters $row : the row inserted and $object: the instance of model used. More... | |
asForm () | |
Returns a form corresponding to the Datatable. More... | |
setTargetSelector ($_targetSelector) | |
Sets the response element selector for Edit and Delete request with ajax. More... | |
getRefreshSelector () | |
setRefreshSelector ($_refreshSelector) | |
show ($modelInstance) | |
{} More... | |
getRowClass () | |
setRowClass ($_rowClass) | |
Sets the default row class (tr class) More... | |
setEmptyMessage ($_emptyMessage) | |
Sets the message displayed when there is no record. More... | |
setSortable ($colIndex=NULL) | |
setActiveRowSelector ($class="active", $event="click", $multiple=false) | |
getActiveRowClass () | |
hasActiveRowSelector () | |
hideColumn ($colIndex) | |
setColWidth ($colIndex, $width) | |
setColWidths ($_colWidths) | |
setColAlignment ($colIndex, $alignment) | |
trigger ($event, $params="[]") | |
onActiveRowChange ($jsCode) | |
getDeleteBehavior () | |
getEditBehavior () | |
getDisplayBehavior () | |
setDisplayBehavior ($_displayBehavior) | |
getGroupByFields () | |
setGroupByFields ($_groupByFields) | |
addGroupBy ($index) | |
setVisibleHover ($_visibleHover) | |
getPaginationToolbar () | |
setInverted ($recursive=true) | |
setFocusable (bool $focusable) | |
setFormCaption ($caption) | |
getNamePrefix () | |
setNamePrefix ($namePrefix) | |
![]() | |
__construct ($identifier, $model, $modelInstance=NULL) | |
show ($modelInstance) | |
getModel () | |
setModel ($_model) | |
getInstanceViewer () | |
setInstanceViewer ($_instanceViewer) | |
getHtmlComponent () | |
setAttached ($value=true) | |
afterCompile ($index, $callback) | |
Associates a $callback function after the compilation of the field at $index position The $callback function can take the following arguments : $field=>the compiled field, $instance : the active instance of the object, $index: the field position. More... | |
setColor ($color) | |
setCaptions ($captions) | |
setCaption ($index, $caption) | |
setFields ($fields) | |
addField ($field, $key=null) | |
addFields ($fields) | |
countFields () | |
addMessage ($attributes=NULL, $fieldName="message") | |
addErrorMessage () | |
insertField ($index, $field, $key=null) | |
insertInField ($index, $field, $key=null) | |
setValueFunction ($index, $callback) | |
Defines the function which displays the field value. More... | |
setIdentifierFunction ($callback) | |
getToolbar () | |
addInToolbar ($element, $callback=NULL) | |
Adds a new element in toolbar. More... | |
addItemInToolbar ($caption, $icon=NULL, $callback=NULL) | |
addItemsInToolbar (array $items, $callback=NULL) | |
addDropdownInToolbar ($value, $items, $callback=NULL) | |
addButtonInToolbar ($caption, $cssStyle=null, $callback=NULL) | |
addButtonsInToolbar (array $captions, $asIcon=false, $callback=NULL) | |
addLabelledIconButtonInToolbar ($caption, $icon, $before=true, $labeled=false) | |
addSubmitInToolbar ($identifier, $value, $cssStyle=NULL, $url=NULL, $responseElement=NULL, $parameters=NULL) | |
setCaptionCallback ($captionCallback) | |
Defines a callback function to call for modifying captions function parameters 0are. More... | |
setEdition ($_edition=true) | |
Makes the input fields editable. More... | |
setDefaultValueFunction ($defaultValueFunction) | |
Defines the default function which displays fields value. More... | |
getDefaultValueFunction () | |
jsDisabled ($disable=true) | |
addEditButtonInToolbar ($caption, $callback=NULL) | |
setToolbar (HtmlMenu $_toolbar) | |
setToolbarPosition ($_toolbarPosition) | |
getForm () | |
run (JsUtils $js) | |
setValidationParams (array $_validationParams) | |
Sets the parameters for the Form validation (on, inline, delay...) More... | |
moveFieldTo ($from, $to) | |
swapFields ($index1, $index2) | |
removeField ($index) | |
asModal ($header=null) | |
addToProperty ($name, $value, $separator=" ") | |
getModelInstance () | |
hasRules () | |
![]() | |
__construct ($identifier, $tagName="p") | |
setContent ($content) | |
getContent () | |
addContent ($content, $before=false) | |
run (JsUtils $js) | |
setValue ($value) | |
wrapContent ($before, $after="") | |
wrapWith (HtmlDoubleElement $container) | |
Wraps the element with a container. More... | |
getContentInstances ($class) | |
asLink ($href=NULL, $target=NULL) | |
Transforms the element into a link. More... | |
getTextContent () | |
asEditable (HtmlFormField $field, $asForm=false, $setValueProperty="val()") | |
![]() | |
__construct ($identifier, $tagName="br") | |
setClass ($classNames) | |
addClass ($classNames) | |
setRole ($value) | |
setTitle ($value) | |
setStyle ($value) | |
run (JsUtils $js) | |
fromArray ($array) | |
setSize ($size) | |
![]() | |
run (JsUtils $js) | |
getTagName () | |
setTagName ($tagName) | |
fromArray ($array) | |
fromDatabaseObjects ($objects, $function) | |
fromDatabaseObject ($object, $function) | |
wrap ($before, $after="") | |
getElementById ($identifier, $elements) | |
getBsComponent () | |
setBsComponent ($bsComponent) | |
compile (JsUtils $js=NULL, &$view=NULL) | |
setDraggable ($attr="id", $dropZone=null, $parameters=[]) | |
Sets the element draggable, and eventualy defines the dropzone (HTML5 drag and drop) More... | |
asDropZone ($jsCallback="", $jqueryDone="append", $parameters=[]) | |
Declares the element as a drop zone (HTML5 drag and drop) More... | |
asFileDropZone ($responseElement=null, $url=null, $progress=null, $jsCallback="", $parameters=[]) | |
Declares the element as a drop zone for file uploading (HTML5 drag and drop) More... | |
__toString () | |
onPostCompile ($callback) | |
onPreCompile ($callback) | |
![]() | |
__construct ($identifier) | |
getIdentifier () | |
setIdentifier ($identifier) | |
getLibraryId () | |
setLibraryId ($_libraryId) | |
Protected Member Functions | |
_generateBehavior ($op, $params, JsUtils $js) | |
getTable () | |
{} More... | |
compileExtraElements ($table, $captions) | |
_applyStyleAttributes ($table) | |
_hideColumns () | |
_generateHeader (HtmlTable $table, $captions) | |
_generateContent ($table) | |
_generateGroupByRow ($index, $gbField, $table, $fields, &$activeValues, &$uuids) | |
_generateRow ($instance, $fields, &$table, $checkedClass=null, $uuids=null) | |
_generatePagination ($table) | |
_associatePaginationBehavior (JsUtils $js=NULL, $offset=null) | |
_compileSearchFieldBehavior (JsUtils $js=NULL) | |
_associateSearchFieldBehavior (JsUtils $js=NULL, $offset=null) | |
_getFieldName ($index) | |
_getFieldCaption ($index) | |
applyToolbarPosition (string $position, $table, $captions=NULL) | |
_setToolbarPosition ($table, $captions=NULL) | |
getTargetSelector ($op) | |
![]() | |
_init ($instanceViewer, $contentKey, $content, $edition) | |
_getIndex ($fieldName) | |
_getFieldIdentifier ($prefix, $name="") | |
_getFieldName ($index) | |
_getFieldCaption ($index) | |
_setToolbarPosition ($table, $captions=NULL) | |
runForm (JsUtils $js) | |
_compileForm () | |
![]() | |
_getContentInstances ($class, $content) | |
compile_once (\Ajax\JsUtils $js=NULL, &$view=NULL) | |
{} More... | |
![]() | |
getTemplate (JsUtils $js=NULL, $view=null) | |
ctrl ($name, $value, $typeCtrl) | |
setMemberCtrl (&$name, $value, $typeCtrl) | |
addToMemberUnique (&$name, $value, $typeCtrl, $separator=" ") | |
addToMemberCtrl (&$name, $value, $typeCtrl, $separator=" ") | |
addToMember (&$name, $value, $separator=' ') | |
removeOldValues (&$oldValue, $allValues) | |
_getElementBy ($callback, $elements) | |
setWrapBefore ($wrapBefore) | |
setWrapAfter ($wrapAfter) | |
compile_once (JsUtils $js=NULL, &$view=NULL) | |
![]() | |
cleanIdentifier ($id) | |
Protected Attributes | |
$_searchField | |
$_urls | |
$_pagination | |
$_compileParts | |
$_deleteBehavior | |
$_editBehavior | |
$_displayBehavior | |
$_visibleHover = false | |
$_targetSelector | |
$_refreshSelector | |
$_emptyMessage | |
$_json | |
$_rowClass = "_element" | |
$_sortable | |
$_hiddenColumns | |
$_colWidths | |
$_paginationToolbar | |
$_caption | |
$_namePrefix | |
![]() | |
$_model | |
$_modelInstance | |
$_instanceViewer | |
$_toolbar | |
$_toolbarPosition | |
$_edition | |
$_form | |
$_generated | |
$_runned | |
$_hasRules | |
![]() | |
$content | |
$wrapContentBefore = "" | |
$wrapContentAfter = "" | |
$_editableContent | |
![]() | |
$_template | |
$tagName | |
$_wrapBefore = array() | |
$_wrapAfter = array() | |
$_bsComponent | |
$_compiled = false | |
$_runned = false | |
$_postCompile | |
$_preCompile | |
![]() | |
$identifier | |
$_identifier | |
$_libraryId | |
$_self | |
Private Member Functions | |
getElementContent ($elm) | |
addToolbarRow ($part, $table, $captions) | |
DataTable widget for displaying list of objects.
Definition at line 27 of file DataTable.php.
__construct | ( | $identifier, | |
$model, | |||
$modelInstance = NULL |
|||
) |
Definition at line 68 of file DataTable.php.
|
protected |
Definition at line 191 of file DataTable.php.
|
protected |
Definition at line 333 of file DataTable.php.
|
protected |
Definition at line 363 of file DataTable.php.
|
protected |
Definition at line 352 of file DataTable.php.
|
protected |
Definition at line 108 of file DataTable.php.
|
protected |
Definition at line 219 of file DataTable.php.
|
protected |
Definition at line 252 of file DataTable.php.
|
protected |
Definition at line 208 of file DataTable.php.
|
protected |
Definition at line 322 of file DataTable.php.
|
protected |
Definition at line 288 of file DataTable.php.
|
protected |
Definition at line 375 of file DataTable.php.
|
protected |
Definition at line 365 of file DataTable.php.
|
protected |
Definition at line 201 of file DataTable.php.
|
protected |
Definition at line 395 of file DataTable.php.
addGroupBy | ( | $index | ) |
Definition at line 735 of file DataTable.php.
addSearchInToolbar | ( | $position = Direction::RIGHT | ) |
Adds a search input in toolbar.
string | $position |
Definition at line 524 of file DataTable.php.
|
private |
Definition at line 420 of file DataTable.php.
afterCompile | ( | $index, | |
$callback | |||
) |
Associates a $callback function after the compilation of the field at $index position The $callback function can take the following arguments : $field=>the compiled field, $instance : the active instance of the object, $index: the field position.
int | $index | postion of the compiled field |
callable | $callback | function called after the field compilation |
Definition at line 415 of file DataTable.php.
|
protected |
Definition at line 379 of file DataTable.php.
asForm | ( | ) |
Returns a form corresponding to the Datatable.
Definition at line 554 of file DataTable.php.
autoPaginate | ( | $page = 1 , |
|
$items_per_page = 10 , |
|||
$pages_visibles = 4 |
|||
) |
Auto Paginates the DataTable element with a Semantic HtmlPaginationMenu component.
number | $page | the active page number |
number | $items_per_page | The number of items per page |
number | $pages_visibles | The number of visible pages in the Pagination component |
Definition at line 501 of file DataTable.php.
compile | ( | JsUtils | $js = NULL , |
& | $view = NULL |
||
) |
Definition at line 139 of file DataTable.php.
|
protected |
Definition at line 176 of file DataTable.php.
getActiveRowClass | ( | ) |
Definition at line 648 of file DataTable.php.
getDeleteBehavior | ( | ) |
Definition at line 691 of file DataTable.php.
getDisplayBehavior | ( | ) |
Definition at line 707 of file DataTable.php.
getEditBehavior | ( | ) |
Definition at line 699 of file DataTable.php.
|
private |
Definition at line 270 of file DataTable.php.
getFieldValue | ( | $index | ) |
Definition at line 277 of file DataTable.php.
getGroupByFields | ( | ) |
Definition at line 723 of file DataTable.php.
getHtmlComponent | ( | ) |
{}
Definition at line 439 of file DataTable.php.
getNamePrefix | ( | ) |
Definition at line 777 of file DataTable.php.
getPaginationToolbar | ( | ) |
Definition at line 754 of file DataTable.php.
getRefreshSelector | ( | ) |
Definition at line 583 of file DataTable.php.
getRowClass | ( | ) |
Definition at line 612 of file DataTable.php.
getSearchField | ( | ) |
Definition at line 529 of file DataTable.php.
|
protected |
|
protected |
Definition at line 558 of file DataTable.php.
getUrls | ( | ) |
Definition at line 443 of file DataTable.php.
hasActiveRowSelector | ( | ) |
Definition at line 652 of file DataTable.php.
hideColumn | ( | $colIndex | ) |
Definition at line 656 of file DataTable.php.
onActiveRowChange | ( | $jsCode | ) |
Definition at line 682 of file DataTable.php.
onNewRow | ( | $callback | ) |
The callback function called after the insertion of each row when fromDatabaseObjects is called callback function takes the parameters $row : the row inserted and $object: the instance of model used.
callable | $callback |
Definition at line 544 of file DataTable.php.
paginate | ( | $page, | |
$total_rowcount, | |||
$items_per_page = 10 , |
|||
$pages_visibles = null |
|||
) |
Paginates the DataTable element with a Semantic HtmlPaginationMenu component.
number | $page | the active page number |
number | $total_rowcount | the total number of items |
number | $items_per_page | The number of items per page |
number | $pages_visibles | The number of visible pages in the Pagination component |
Definition at line 485 of file DataTable.php.
refresh | ( | $compileParts = [ 'tbody' ] | ) |
refreshTD | ( | $fieldName, | |
$jquery, | |||
$view | |||
) |
Definition at line 131 of file DataTable.php.
refreshTR | ( | ) |
Definition at line 126 of file DataTable.php.
run | ( | JsUtils | $js | ) |
Definition at line 76 of file DataTable.php.
setActiveRowSelector | ( | $class = "active" , |
|
$event = "click" , |
|||
$multiple = false |
|||
) |
Definition at line 643 of file DataTable.php.
setColAlignment | ( | $colIndex, | |
$alignment | |||
) |
Definition at line 673 of file DataTable.php.
setColWidth | ( | $colIndex, | |
$width | |||
) |
Definition at line 663 of file DataTable.php.
setColWidths | ( | $_colWidths | ) |
Definition at line 668 of file DataTable.php.
setDisplayBehavior | ( | $_displayBehavior | ) |
mixed | $_displayBehavior |
Definition at line 715 of file DataTable.php.
setEmptyMessage | ( | $_emptyMessage | ) |
Sets the message displayed when there is no record.
mixed | $_emptyMessage |
Definition at line 633 of file DataTable.php.
setFocusable | ( | bool | $focusable | ) |
Definition at line 765 of file DataTable.php.
setFormCaption | ( | $caption | ) |
Definition at line 769 of file DataTable.php.
setGroupByFields | ( | $_groupByFields | ) |
mixed | $_groupByFields |
Definition at line 731 of file DataTable.php.
setInverted | ( | $recursive = true | ) |
Definition at line 758 of file DataTable.php.
setNamePrefix | ( | $namePrefix | ) |
mixed | $namePrefix |
Definition at line 785 of file DataTable.php.
setRefreshSelector | ( | $_refreshSelector | ) |
setRowClass | ( | $_rowClass | ) |
Sets the default row class (tr class)
string | $_rowClass |
Definition at line 622 of file DataTable.php.
setSortable | ( | $colIndex = NULL | ) |
Definition at line 638 of file DataTable.php.
setTargetSelector | ( | $_targetSelector | ) |
Sets the response element selector for Edit and Delete request with ajax.
string | array | $_targetSelector | string or associative array ["edit"=>"edit_selector","delete"=>"delete_selector"] |
Definition at line 572 of file DataTable.php.
setUrls | ( | $urls | ) |
Sets the associative array of urls for refreshing, updating or deleting think of defining the update zone with the setTargetSelector method.
string | array | $urls | associative array with keys refresh: for refreshing with search field or pagination, edit : for updating a row, delete: for deleting a row |
Definition at line 455 of file DataTable.php.
setVisibleHover | ( | $_visibleHover | ) |
boolean | $_visibleHover |
Definition at line 746 of file DataTable.php.
show | ( | $modelInstance | ) |
trigger | ( | $event, | |
$params = "[]" |
|||
) |
Definition at line 678 of file DataTable.php.
|
protected |
Definition at line 64 of file DataTable.php.
|
protected |
Definition at line 60 of file DataTable.php.
|
protected |
Definition at line 36 of file DataTable.php.
|
protected |
Definition at line 38 of file DataTable.php.
|
protected |
Definition at line 42 of file DataTable.php.
|
protected |
Definition at line 40 of file DataTable.php.
|
protected |
Definition at line 50 of file DataTable.php.
|
protected |
Definition at line 58 of file DataTable.php.
|
protected |
Definition at line 52 of file DataTable.php.
|
protected |
Definition at line 66 of file DataTable.php.
|
protected |
Definition at line 34 of file DataTable.php.
|
protected |
Definition at line 62 of file DataTable.php.
|
protected |
Definition at line 48 of file DataTable.php.
|
protected |
Definition at line 54 of file DataTable.php.
|
protected |
Definition at line 30 of file DataTable.php.
|
protected |
Definition at line 56 of file DataTable.php.
|
protected |
Definition at line 46 of file DataTable.php.
|
protected |
Definition at line 32 of file DataTable.php.
|
protected |
Definition at line 44 of file DataTable.php.