Used to generate HTML for a table of database records. This is usually used for the admin/contents/* route which provides the main UI to operators for a given ManagedAdminController
This is the code documentation for the SproutCMS project
Search documentation |
class ItemlistUsed to generate HTML for a table of database records. This is usually used for the admin/contents/* route which provides the main UI to operators for a given ManagedAdminController
Variables
Functions
public __toStringunknown $Itemlist->__toString ( ); This function does not have a description public addActionvoid $Itemlist->addAction ( string $name , string $url [, string $classes [, callable $show_func ]] ); Adds an action to this itemlist. The special action 'edit' is used when the row is clicked. public addAggregateColumnvoid $Itemlist->addAggregateColumn ( string $title , string $operation [, ColModifier $modifier ] ); Add an aggregate which operates on the values of a column public addAggregateValuevoid $Itemlist->addAggregateValue ( string $title , string $value ); Add an aggregate which is just a single pre-computed value protected calculateAggregateColumnmixed Itemlist::calculateAggregateColumn ( string $operation , array $values ); Calculate the result of an aggregation public renderunknown $Itemlist->render ( ); This function does not have a description protected renderItemstring Itemlist::renderItem ( mixed $defn , array|object $item_data ); Renders an itemlist definition Definition can be one of: - A field name - An array with two indexes, 0 => ColModifier, 1 => field name - A Closure, which will receive one argument of the entire row as an array, and must return a string of HTML The Closure result supports a subset of HTML, Text::limitedSubsetHtml for more details public setActionsClassesvoid $Itemlist->setActionsClasses ( string $classes ); Set link classes common for all actions The default is "actions--link". public setActionsFuncvoid $Itemlist->setActionsFunc ( mixed $func ); Set a function which should return content for the actions column The func should have this signature: string function mycallable(array $row) The return value should be HTML with the links public setCheckboxesvoid $Itemlist->setCheckboxes ( mixed $checkboxes ); Does this itemlist support checkboxes? public setOrderingvoid $Itemlist->setOrdering ( mixed $ordering ); Does this itemlist support ordering? public setRowClassesFuncvoid $Itemlist->setRowClassesFunc ( callable $func ); Set a function which should return the classes to use on the row. string function mycallable(array $row) The return value should be a string of class names private urlReplaceunknown $Itemlist->urlReplace ( mixed $url , mixed $item ); Does the parameter replacements on an action url Replaces %% with the id of the record. |
Powered by Pelzini, version 0.9.0 |
Documentation is made available under the
GNU Free Documentation License 1.2. Generated: Monday, 3rd April, 2023 at 02:59 pm |