phpMv -UI toolkit 2.4.12
jQuery, jQuery UI, Twitter Bootstrap and Semantic-UI library for php & php MVC Frameworks
|
Semantic HTML Table component. More...
Public Member Functions | ||||
getActiveRowSelector () | ||||
__construct ($identifier, $rowCount, $colCount) | ||||
getPart ($key) | ||||
Returns/create eventually a part of the table corresponding to the $key : thead, tbody or tfoot. | ||||
getBody () | ||||
Returns/create eventually the body of the table. | ||||
getRowCount () | ||||
Returns the number of rows (TR) | ||||
getHeader () | ||||
Returns/create eventually the header of the table. | ||||
getFooter () | ||||
Returns/create eventually the footer of the table. | ||||
hasPart ($key) | ||||
Checks if the part corresponding to $key exists. | ||||
setRowCount ($rowCount, $colCount) | ||||
getCell ($row, $col) | ||||
Returns the cell (HtmlTD) at position $row,$col. | ||||
getRow ($rowIndex) | ||||
Retuns the row at $rowIndex. | ||||
addRow ($values=array()) | ||||
Adds a new row and sets $values to his cols. | ||||
newRow () | ||||
adds and returns a new row | ||||
setValues ($values=array()) | ||||
Sets the tbody values. | ||||
setHeaderValues ($values=array()) | ||||
Sets the header values. | ||||
setFooterValues ($values=array()) | ||||
Sets the footer values. | ||||
setColValues ($colIndex, $values=array()) | ||||
Sets values to the col at index $colIndex. | ||||
setRowValues ($rowIndex, $values=array()) | ||||
Sets values to the row at index $rowIndex. | ||||
addColVariations ($colIndex, $variations=array()) | ||||
colCenter ($colIndex) | ||||
Sets the col alignment to center. | ||||
colRight ($colIndex) | ||||
Sets the col alignment to right. | ||||
colLeft ($colIndex) | ||||
Sets col alignment to left. | ||||
colCenterFromRight ($colIndex) | ||||
Sets the col alignment to center. | ||||
colRightFromRight ($colIndex) | ||||
Sets the col alignment to right. | ||||
colLeftFromRight ($colIndex) | ||||
Sets col alignment to left. | ||||
setColAlignment ($colIndex, $alignment) | ||||
setColAlignmentFromRight ($colIndex, $alignment) | ||||
conditionalCellFormat ($callback, $format) | ||||
Applies a format on each cell when $callback returns true. | ||||
conditionalRowFormat ($callback, $format) | ||||
Applies a format on each row when $callback returns true. | ||||
applyCells ($callback) | ||||
Applies a callback function on each cell. | ||||
applyRows ($callback) | ||||
Applies a callback function on each row. | ||||
compile (JsUtils $js=NULL, &$view=NULL) | ||||
{{}
| ||||
fromDatabaseObject ($object, $function) | ||||
{} | ||||
setCompileParts ($parts=["tbody"]) | ||||
Sets the parts of the Table to compile. | ||||
refreshTR () | ||||
refresh ($js) | ||||
run (JsUtils $js) | ||||
{{
| ||||
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. | ||||
setActiveRowSelector ($class="active", $event="click", $multiple=false) | ||||
Defines how a row is selectable. | ||||
getActiveRowClass () | ||||
hasActiveRowSelector () | ||||
hideColumn ($colIndex) | ||||
setColWidth ($colIndex, $width) | ||||
setColWidths ($widths) | ||||
mergeIdentiqualValues ($colIndex, $function="strip_tags") | ||||
getInnerScript () | ||||
setInnerScript ($_innerScript) | ||||
onActiveRowChange ($jsCode) | ||||
addMergeRow ($colCount, $value=null) | ||||
setFocusable (bool $focusable) | ||||
Public Member Functions inherited from HtmlSemDoubleElement | ||||
__construct ($identifier, $tagName="p", $baseClass="ui", $content=NULL) | ||||
setPopupAttributes ($variation=NULL, $popupEvent=NULL) | ||||
Defines the popup attributes. | ||||
addPopup ($title="", $content="", $variation=NULL, $params=array()) | ||||
Adds a popup to the element. | ||||
addPopupHtml ($html="", $variation=NULL, $params=array()) | ||||
Adds an html popup to the element. | ||||
addDimmer ($params=array(), $content=NULL) | ||||
Adds a Dimmer to the element. | ||||
addLabel ($label, $before=false, $icon=NULL) | ||||
Adds a label to the element. | ||||
attachLabel ($label, $side=Side::TOP, $direction=Direction::NONE, $icon=NULL) | ||||
Adds an attached label to the element. | ||||
asLink ($href=NULL, $target=NULL) | ||||
Transforms the element into a link. | ||||
jsShowDimmer ($show=true) | ||||
Returns the script displaying the dimmer. | ||||
addList ($items, $ordered=false) | ||||
asToast ($params=NULL) | ||||
asSideBar ($classes='') | ||||
Public Member Functions inherited from HtmlDoubleElement | ||||
__construct ($identifier, $tagName="p") | ||||
setContent ($content) | ||||
getContent () | ||||
addContent ($content, $before=false) | ||||
setValue ($value) | ||||
wrapContent ($before, $after="") | ||||
wrapWith (HtmlDoubleElement $container) | ||||
Wraps the element with a container. | ||||
getContentInstances ($class) | ||||
getTextContent () | ||||
asEditable (HtmlFormField $field, $asForm=false, $setValueProperty="val()") | ||||
Public Member Functions inherited from HtmlSingleElement | ||||
setClass ($classNames) | ||||
addClass ($classNames) | ||||
setRole ($value) | ||||
setTitle ($value) | ||||
setStyle ($value) | ||||
fromArray ($array) | ||||
setSize ($size) | ||||
Public Member Functions inherited from BaseHtml | ||||
getTagName () | ||||
setTagName ($tagName) | ||||
fromDatabaseObjects ($objects, $function) | ||||
wrap ($before, $after="") | ||||
getElementById ($identifier, $elements) | ||||
getBsComponent () | ||||
setBsComponent ($bsComponent) | ||||
setDraggable ($attr="id", $dropZone=null, $parameters=[]) | ||||
Sets the element draggable, and eventualy defines the dropzone (HTML5 drag and drop) | ||||
asDropZone ($jsCallback="", $jqueryDone="append", $parameters=[]) | ||||
Declares the element as a drop zone (HTML5 drag and drop) | ||||
asFileDropZone ($responseElement=null, $url=null, $progress=null, $jsCallback="", $parameters=[]) | ||||
Declares the element as a drop zone for file uploading (HTML5 drag and drop) | ||||
__toString () | ||||
onPostCompile ($callback) | ||||
onPreCompile ($callback) | ||||
Public Member Functions inherited from BaseWidget | ||||
__construct ($identifier) | ||||
getIdentifier () | ||||
setIdentifier ($identifier) | ||||
getLibraryId () | ||||
setLibraryId ($_libraryId) | ||||
Public Member Functions inherited from BaseHtmlEventsTrait | ||||
addEvent ($event, $jsCode, $stopPropagation=false, $preventDefault=false) | ||||
trigger ($event, $params="[]") | ||||
jsTrigger ($event, $params="[this]") | ||||
_addEvent ($event, $jsCode) | ||||
on ($event, $jsCode, $stopPropagation=false, $preventDefault=false) | ||||
onClick ($jsCode, $stopPropagation=false, $preventDefault=true) | ||||
setClick ($jsCode) | ||||
onCreate ($jsCode) | ||||
addEventsOnRun (JsUtils $js=NULL) | ||||
_ajaxOn ($operation, $event, $url, $responseElement="", $parameters=array()) | ||||
getOn ($event, $url, $responseElement="", $parameters=array()) | ||||
Performs a get to $url on the event $event on $element and display it in $responseElement. | ||||
getOnClick ($url, $responseElement="", $parameters=array()) | ||||
Performs a get to $url on the click event on $element and display it in $responseElement. | ||||
postOn ($event, $url, $params="{}", $responseElement="", $parameters=array()) | ||||
Performs a post to $url on the event $event on $element and display it in $responseElement. | ||||
postOnClick ($url, $params="{}", $responseElement="", $parameters=array()) | ||||
Performs a post to $url on the click event on $element and display it in $responseElement. | ||||
postFormOn ($event, $url, $form, $responseElement="", $parameters=array()) | ||||
Performs a post form with ajax. | ||||
postFormOnClick ($url, $form, $responseElement="", $parameters=array()) | ||||
Performs a post form with ajax on click. | ||||
jsDoJquery ($jqueryCall, $param="") | ||||
executeOnRun ($jsCode) | ||||
jsHtml ($content="") | ||||
jsShow () | ||||
jsHide () | ||||
jsToggle ($value) | ||||
getEvents () | ||||
Public Member Functions inherited from BaseHtmlPropertiesTrait | ||||
getProperties () | ||||
setProperties ($properties) | ||||
setProperty ($name, $value) | ||||
getProperty ($name) | ||||
addToProperty ($name, $value, $separator=" ") | ||||
addProperties ($properties) | ||||
removePropertyValue ($name, $value) | ||||
addToPropertyCtrl ($name, $value, $typeCtrl) | ||||
addToPropertyCtrlCheck ($name, $value, $typeCtrl) | ||||
removeProperty ($name) | ||||
propertyContains ($propertyName, $value) | ||||
Public Member Functions inherited from BaseTrait | ||||
addToProperty ($name, $value, $separator=" ") | ||||
setProperty ($name, $value) | ||||
addContent ($content, $before=false) | ||||
onCreate ($jsCode) | ||||
addVariation ($variation) | ||||
addState ($state) | ||||
setVariation ($variation) | ||||
setVariations ($variations) | ||||
setState ($state) | ||||
addVariations ($variations=array()) | ||||
addStates ($states=array()) | ||||
setStates ($states) | ||||
addIcon ($icon, $before=true) | ||||
addSticky ($context="body") | ||||
setSize ($size) | ||||
setDisabled ($disable=true) | ||||
show it is currently unable to be interacted with | ||||
setColor ($color) | ||||
setFluid () | ||||
asHeader () | ||||
setActive ($value=true) | ||||
show it is currently the active user selection | ||||
setAttached ($value=true) | ||||
setInverted ($recursive=true) | ||||
can be formatted to appear on dark backgrounds | ||||
setCircular () | ||||
setFloated ($direction="right") | ||||
floatRight () | ||||
floatLeft () | ||||
getBaseClass () | ||||
getVariations () | ||||
getStates () | ||||
Public Member Functions inherited from TableTrait | ||||
addEvent ($event, $jsCode, $stopPropagation=false, $preventDefault=false) | ||||
getOn ($event, $url, $responseElement="", $parameters=array()) | ||||
setCelled () | ||||
setBasic ($very=false) | ||||
setCompact ($very=false) | ||||
setCollapsing () | ||||
setDefinition () | ||||
setStructured () | ||||
setSortable ($colIndex=NULL) | ||||
setSingleLine () | ||||
setFixed () | ||||
setSelectable () | ||||
setStriped () | ||||
onRowClick ($jsCode, $stopPropagation=false, $preventDefault=false) | ||||
onRow ($event, $jsCode, $stopPropagation=false, $preventDefault=false) | ||||
getOnRow ($event, $url, $responseElement="", $parameters=array()) | ||||
onPageChange ($jsCode) | ||||
onSearchTerminate ($jsCode) | ||||
getEventsScript () | ||||
addEventsOnRun (JsUtils $js=NULL) | ||||
Protected Member Functions | |
_getFirstPart () | |
compile_once (JsUtils $js=NULL, &$view=NULL) | |
Protected Member Functions inherited from HtmlDoubleElement | |
_getContentInstances ($class, $content) | |
compile_once (\Ajax\JsUtils $js=NULL, &$view=NULL) | |
{} | |
Protected Member Functions inherited from BaseHtml | |
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) | |
Protected Member Functions inherited from BaseWidget | |
cleanIdentifier ($id) | |
Protected Member Functions inherited from BaseHtmlEventsTrait | |
_eventsOnCreate (JsUtils $js=NULL) | |
Protected Member Functions inherited from BaseHtmlPropertiesTrait | |
removePropertyValues ($name, $values) | |
addToPropertyUnique ($name, $value, $typeCtrl) | |
setPropertyCtrl ($name, $value, $typeCtrl) | |
getElementByPropertyValue ($propertyName, $value, $elements) | |
Protected Member Functions inherited from BaseTrait | |
setPropertyCtrl ($name, $value, $typeCtrl) | |
addToPropertyCtrl ($name, $value, $typeCtrl) | |
addToPropertyCtrlCheck ($name, $value, $typeCtrl) | |
addBehavior (&$array, $key, $value, $before="", $after="") | |
Protected Member Functions inherited from TableTrait | |
addToPropertyTable ($property, $value) | |
Protected Attributes | |
$_innerScript | |
Protected Attributes inherited from HtmlSemDoubleElement | |
$_popup = NULL | |
$_dimmer = NULL | |
$_toast = NULL | |
$_sidebar = NULL | |
$_params = array() | |
Protected Attributes inherited from HtmlDoubleElement | |
$content | |
$wrapContentBefore = "" | |
$wrapContentAfter = "" | |
$_editableContent | |
Protected Attributes inherited from BaseHtml | |
$_template | |
$tagName | |
$_wrapBefore = array() | |
$_wrapAfter = array() | |
$_bsComponent | |
$_compiled = false | |
$_runned = false | |
$_postCompile | |
$_preCompile | |
Protected Attributes inherited from BaseWidget | |
$identifier | |
$_identifier | |
$_libraryId | |
$_self | |
Protected Attributes inherited from BaseHtmlEventsTrait | |
$_events =array () | |
Protected Attributes inherited from BaseHtmlPropertiesTrait | |
$properties =array () | |
Protected Attributes inherited from BaseTrait | |
$_variations =[ ] | |
$_states =[ ] | |
$_baseClass | |
Private Member Functions | |
colAlign ($colIndex, $function) | |
Private Attributes | |
$_colCount | |
$_compileParts | |
$_footer | |
$_afterCompileEvents | |
$_activeRowSelector | |
$_focusable = false | |
Semantic HTML Table component.
Definition at line 21 of file HtmlTable.php.
__construct | ( | $identifier, | |
$rowCount, | |||
$colCount | |||
) |
Definition at line 45 of file HtmlTable.php.
|
protected |
Definition at line 78 of file HtmlTable.php.
addColVariations | ( | $colIndex, | |
$variations = array() |
|||
) |
Definition at line 240 of file HtmlTable.php.
addMergeRow | ( | $colCount, | |
$value = null |
|||
) |
Definition at line 587 of file HtmlTable.php.
addRow | ( | $values = array() | ) |
Adds a new row and sets $values to his cols.
array | $values |
Definition at line 169 of file HtmlTable.php.
applyCells | ( | $callback | ) |
Applies a callback function on each cell.
callable | $callback |
Definition at line 394 of file HtmlTable.php.
applyRows | ( | $callback | ) |
Applies a callback function on each row.
callable | $callback |
Definition at line 405 of file HtmlTable.php.
|
private |
Definition at line 346 of file HtmlTable.php.
colCenter | ( | $colIndex | ) |
Sets the col alignment to center.
int | $colIndex |
Definition at line 250 of file HtmlTable.php.
colCenterFromRight | ( | $colIndex | ) |
Sets the col alignment to center.
int | $colIndex |
Definition at line 280 of file HtmlTable.php.
colLeft | ( | $colIndex | ) |
Sets col alignment to left.
int | $colIndex |
Definition at line 270 of file HtmlTable.php.
colLeftFromRight | ( | $colIndex | ) |
Sets col alignment to left.
int | $colIndex |
Definition at line 300 of file HtmlTable.php.
colRight | ( | $colIndex | ) |
Sets the col alignment to right.
int | $colIndex |
Definition at line 260 of file HtmlTable.php.
colRightFromRight | ( | $colIndex | ) |
Sets the col alignment to right.
int | $colIndex |
Definition at line 290 of file HtmlTable.php.
compile | ( | JsUtils | $js = NULL , |
& | $view = NULL |
||
) |
{{}
Reimplemented from HtmlSemDoubleElement.
Definition at line 416 of file HtmlTable.php.
|
protected |
Reimplemented from BaseHtml.
Definition at line 425 of file HtmlTable.php.
conditionalCellFormat | ( | $callback, | |
$format | |||
) |
Applies a format on each cell when $callback returns true.
callable | $callback | function with the cell as parameter, must return a boolean |
string | $format | css class to apply |
Definition at line 369 of file HtmlTable.php.
conditionalRowFormat | ( | $callback, | |
$format | |||
) |
Applies a format on each row when $callback returns true.
callable | $callback | function with the row as parameter, must return a boolean |
string | $format | css class to apply |
Definition at line 383 of file HtmlTable.php.
fromDatabaseObject | ( | $object, | |
$function | |||
) |
{}
Reimplemented from BaseHtml.
Definition at line 438 of file HtmlTable.php.
getActiveRowClass | ( | ) |
Definition at line 516 of file HtmlTable.php.
getActiveRowSelector | ( | ) |
Definition at line 39 of file HtmlTable.php.
getBody | ( | ) |
Returns/create eventually the body of the table.
Definition at line 90 of file HtmlTable.php.
getCell | ( | $row, | |
$col | |||
) |
Returns the cell (HtmlTD) at position $row,$col.
int | $row | |
int | $col |
Definition at line 149 of file HtmlTable.php.
getFooter | ( | ) |
Returns/create eventually the footer of the table.
Definition at line 117 of file HtmlTable.php.
getHeader | ( | ) |
Returns/create eventually the header of the table.
Definition at line 108 of file HtmlTable.php.
getInnerScript | ( | ) |
Definition at line 570 of file HtmlTable.php.
getPart | ( | $key | ) |
Returns/create eventually a part of the table corresponding to the $key : thead, tbody or tfoot.
string | $key |
Definition at line 68 of file HtmlTable.php.
getRow | ( | $rowIndex | ) |
Retuns the row at $rowIndex.
int | $rowIndex |
Definition at line 159 of file HtmlTable.php.
getRowCount | ( | ) |
hasActiveRowSelector | ( | ) |
Definition at line 523 of file HtmlTable.php.
hasPart | ( | $key | ) |
Checks if the part corresponding to $key exists.
string | $key |
Definition at line 127 of file HtmlTable.php.
hideColumn | ( | $colIndex | ) |
Definition at line 527 of file HtmlTable.php.
mergeIdentiqualValues | ( | $colIndex, | |
$function = "strip_tags" |
|||
) |
Definition at line 560 of file HtmlTable.php.
newRow | ( | ) |
onActiveRowChange | ( | $jsCode | ) |
Definition at line 582 of file HtmlTable.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 498 of file HtmlTable.php.
refresh | ( | $js | ) |
Definition at line 471 of file HtmlTable.php.
refreshTR | ( | ) |
Definition at line 466 of file HtmlTable.php.
run | ( | JsUtils | $js | ) |
{{
JsUtils | $js |
Reimplemented from HtmlSemDoubleElement.
Definition at line 478 of file HtmlTable.php.
setActiveRowSelector | ( | $class = "active" , |
|
$event = "click" , |
|||
$multiple = false |
|||
) |
Defines how a row is selectable.
string | $class | |
string | $event | |
boolean | $multiple |
Definition at line 511 of file HtmlTable.php.
setColAlignment | ( | $colIndex, | |
$alignment | |||
) |
Definition at line 304 of file HtmlTable.php.
setColAlignmentFromRight | ( | $colIndex, | |
$alignment | |||
) |
Definition at line 325 of file HtmlTable.php.
setColValues | ( | $colIndex, | |
$values = array() |
|||
) |
Sets values to the col at index $colIndex.
int | $colIndex | |
array | $values |
Definition at line 223 of file HtmlTable.php.
setColWidth | ( | $colIndex, | |
$width | |||
) |
Definition at line 538 of file HtmlTable.php.
setColWidths | ( | $widths | ) |
Definition at line 545 of file HtmlTable.php.
setCompileParts | ( | $parts = [ "tbody" ] | ) |
Sets the parts of the Table to compile.
array | $parts | array of thead,tbody,tfoot |
Definition at line 459 of file HtmlTable.php.
setFocusable | ( | bool | $focusable | ) |
bool | $focusable |
Definition at line 595 of file HtmlTable.php.
setFooterValues | ( | $values = array() | ) |
Sets the footer values.
array | $values |
Definition at line 212 of file HtmlTable.php.
setHeaderValues | ( | $values = array() | ) |
Sets the header values.
array | $values |
Definition at line 202 of file HtmlTable.php.
setInnerScript | ( | $_innerScript | ) |
mixed | $_innerScript |
Definition at line 578 of file HtmlTable.php.
setRowCount | ( | $rowCount, | |
$colCount | |||
) |
int | $rowCount | |
int | $colCount |
Definition at line 137 of file HtmlTable.php.
setRowValues | ( | $rowIndex, | |
$values = array() |
|||
) |
Sets values to the row at index $rowIndex.
int | $rowIndex | |
array | $values |
Definition at line 235 of file HtmlTable.php.
setValues | ( | $values = array() | ) |
Sets the tbody values.
array | $values | values in an array of array |
Definition at line 191 of file HtmlTable.php.
|
private |
Definition at line 31 of file HtmlTable.php.
|
private |
Definition at line 29 of file HtmlTable.php.
|
private |
Definition at line 23 of file HtmlTable.php.
|
private |
Definition at line 25 of file HtmlTable.php.
|
private |
Definition at line 33 of file HtmlTable.php.
|
private |
Definition at line 27 of file HtmlTable.php.
|
protected |
Definition at line 43 of file HtmlTable.php.