Functions

Get the Tempcode for a table header row.

columned_table_header_row(array $values) : \Tempcode
package core_abstract_interfaces

Parameters

$values

array

The array of field titles that define the entries in the table table

Returns

\TempcodeThe generated header

Get the Tempcode for a table row.

columned_table_row(array $values, boolean $escape) : \Tempcode
package core_abstract_interfaces

Parameters

$values

array

The array of values that make up this row

$escape

boolean

Whether to add escaping

Returns

\TempcodeThe generated row

Get the Tempcode for a confirmation page.

confirm_screen(\Tempcode $title, \Tempcode $preview, mixed $url_type, \?mixed $back_url_type = null, \?array $sup_post = null, \?Tempcode $fields = null) : \Tempcode
package core_abstract_interfaces

Parameters

$title

\Tempcode

The title for the confirmation page (out of get_screen_title)

$preview

\Tempcode

The preview that's being confirmed for actualisation

$url_type

mixed

The URL type to confirm through to OR a full URL OR a full URL (if long, or if Tempcode)

$back_url_type

\?mixed

The URL type if we click back OR a full URL (if long, or if Tempcode) (null: none)

$sup_post

\?array

A map of supplementary post data to get passed through upon confirmation (null: none)

$fields

\?Tempcode

Form fields to pass through as post data on confirmation (null: none)

Returns

\TempcodeThe confirmation page

Get the Tempcode for a do next manager. A do next manager is a series of linked icons that are presented after performing an action. Modules that do not use do-next pages, usually use REFRESH_PAGE's.

do_next_manager(\?Tempcode $title, \Tempcode $text, \?array $main = null, \?string $main_title = null, \?array $url_add_one = null, \?array $url_edit_this = null, \?array $url_edit_one = null, \?array $url_view_this = null, \?array $url_view_archive = null, \?array $url_add_to_category = null, \?array $url_add_one_category = null, \?array $url_edit_one_category = null, \?array $url_edit_this_category = null, \?array $url_view_this_category = null, \?array $entry_extras = null, \?array $category_extras = null, \?array $additional_extras = null, \?mixed $additional_title = null, \?Tempcode $intro = null, \?Tempcode $entries_title = null, \?Tempcode $categories_title = null) : \Tempcode
package core_abstract_interfaces

Parameters

$title

\?Tempcode

The title of what we just did (should have been passed through get_screen_title already) (null: don't do full page)

$text

\Tempcode

The 'text' (actually, a full XHTML lump) to show on the page

$main

\?array

An array of entry types, with each array entry being -- an array consisting of the type codename and a URL array as per following parameters (null: none)

$main_title

\?string

The title to use for the main links (null: none)

$url_add_one

\?array

The URL used to 'add-one' (null: impossible) (format: array of page, param, zone[, custom label])

$url_edit_this

\?array

The URL used to 'edit-this' (null: impossible) (format: array of page, param, zone[, custom label])

$url_edit_one

\?array

The URL used to 'edit-one' (null: impossible) (format: array of page, param, zone[, custom label])

$url_view_this

\?array

The URL used to 'view-this' (null: impossible) (format: array of page, param, zone[, custom label])

$url_view_archive

\?array

The URL used to 'view-archive' (null: impossible) (format: array of page, param, zone[, custom label])

$url_add_to_category

\?array

The URL used to 'add-to-category' (null: impossible) (format: array of page, param, zone[, custom label])

$url_add_one_category

\?array

The URL used to 'add-one-category' (null: impossible) (format: array of page, param, zone[, custom label])

$url_edit_one_category

\?array

The URL used to 'edit-one-category' (null: impossible) (format: array of page, param, zone[, custom label])

$url_edit_this_category

\?array

The URL used to 'edit-this-category' (null: impossible) (format: array of page, param, zone[, custom label])

$url_view_this_category

\?array

The URL used to 'view-this-category' (null: impossible) (format: array of page, param, zone[, custom label])

$entry_extras

\?array

An array of additional entry types, with each array entry being -- an array of type codename and a URL array as before (null: none)

$category_extras

\?array

As before, but with category types (null: none)

$additional_extras

\?array

As before, but for an 'extra types' box of do next actions (null: none)

$additional_title

\?mixed

The title to use for the extra types (null: none)

$intro

\?Tempcode

Introductory text (null: none)

$entries_title

\?Tempcode

Entries section title (null: default, Entries)

$categories_title

\?Tempcode

Categories section title (null: default, Categories)

Returns

\TempcodeThe do next manager

Get the Tempcode for a do next manager. A do next manager is a series of linked icons that are presented after performing an action. Modules that do not use do-next pages, usually use REFRESH_PAGE's.

do_next_manager_hooked(\ID_TEXT $title, \?mixed $text, \ID_TEXT $type, \?string $main_title = null) : \Tempcode
package core_abstract_interfaces

Parameters

$title

\ID_TEXT

The title of what we are doing (a language string)

$text

\?mixed

The language code for the docs of the hook defined do-next manager that we're creating OR Tempcode for it (null: none)

$type

\ID_TEXT

The menu 'type' we are doing (filters out any icons that don't match it)

$main_title

\?string

The title to use for the main links (a language string) (null: same as title)

Returns

\TempcodeThe do next manager

Put the contents of a screen inside an AJAX updatable area. This is typically used when a page is being used to traverse a result-set that spans multiple screens.

internalise_own_screen(\Tempcode $screen_content, \?integer $refresh_time = null, \?mixed $refresh_if_changed = null) : \Tempcode
package core_abstract_interfaces

Parameters

$screen_content

\Tempcode

The screen content

$refresh_time

\?integer

The time between refreshes (null: do not refresh)

$refresh_if_changed

\?mixed

Data. A refresh will only happen if an AJAX-check indicates this data has changed (null: no check)

Returns

\TempcodeThe screen output, wrapped with some AJAX code

Get the Tempcode for a view space page. (a view space shows a single entry, with the field name for each field to the left of the value)

map_table(\Tempcode $title, array $fields) : \Tempcode
package core_abstract_interfaces

Parameters

$title

\Tempcode

The title of the view space; should be out of get_screen_title

$fields

array

An array of mappings between title and value (each mapping being a field)

Returns

\TempcodeThe generated view space

Get the Tempcode for a view space field.

map_table_field(mixed $name, mixed $value, boolean $raw = false, string $abbr = '') : \Tempcode
package core_abstract_interfaces

Parameters

$name

mixed

The field title (Tempcode or string). Assumed unescaped.

$value

mixed

The field value (Tempcode or string). Assumed unescaped.

$raw

boolean

Whether the field should be shown as untitled... because it is an element of a subblock of raw rows

$abbr

string

Field abbreviation (blank: none)

Returns

\TempcodeThe generated view space field

Get the Tempcode for a results browser.

pagination(\Tempcode $title, integer $start, \ID_TEXT $start_name, integer $max, \ID_TEXT $max_name, integer $max_rows, boolean $keep_post = false, integer $max_page_links = 5, \?array $_selectors = null, \ID_TEXT $hash = '') : \Tempcode
package core_abstract_interfaces

Parameters

$title

\Tempcode

The title/name of the resource we are browsing through

$start

integer

The current position in the browser

$start_name

\ID_TEXT

The parameter name used to store our position in the results (usually, 'start')

$max

integer

The maximum number of rows to show per browser page

$max_name

\ID_TEXT

The parameter name used to store the total number of results to show per-page (usually, 'max')

$max_rows

integer

The maximum number of rows in the entire dataset

$keep_post

boolean

Whether to keep post data when browsing through

$max_page_links

integer

The maximum number of quick-jump page-links to show

$_selectors

\?array

List of per-page selectors to show (null: show hard-coded ones)

$hash

\ID_TEXT

Hash component to URL

Returns

\TempcodeThe results browser

Get the Tempcode for a results entry. You would gather together the outputs of several of these functions, then put them in as the $fields in a results_table function call.

results_entry(array $values, boolean $auto_escape, \?string $tplset = null, string $guid = '9e340dd14173c7320b57243d607718ab') : \Tempcode
package core_abstract_interfaces

Parameters

$values

array

The array of values that make up this entry (of Tempcode or string, or mixture)

$auto_escape

boolean

Whether to automatically escape each entry so that it cannot contain HTML

$tplset

\?string

The template set to use (null: default)

$guid

string

GUID to pass to template

Returns

\TempcodeThe generated entry

Get the Tempcode for a results table title row. You would take the output of this, and feed it in as $fields_title, in a results_table function call.

results_field_title(array $values, \?array $sortables = null, \ID_TEXT $order_param = 'sort', \ID_TEXT $current_ordering = '', string $guid = 'fbcaf8b021e3939bfce1dce9ff8ed63a') : \Tempcode
package core_abstract_interfaces

Parameters

$values

array

The array of field titles that define the entries in the results table

$sortables

\?array

A map of sortable code (usually, db field names), to strings giving the human name for the sort order (null: no sortables)

$order_param

\ID_TEXT

The parameter name used to store our sortable

$current_ordering

\ID_TEXT

The current ordering ("$sortable $sort_order")

$guid

string

GUID to pass to template

Returns

\TempcodeThe generated title

Get the Tempcode for a results launcher.

results_launcher(\Tempcode $title, \ID_TEXT $page, \AUTO_LINK $category_id, integer $max, integer $max_rows, \ID_TEXT $type, integer $max_page_links = 5) : \Tempcode
package core_abstract_interfaces

Parameters

$title

\Tempcode

The title/name of the resource we are browsing through

$page

\ID_TEXT

The page name we are launching into

$category_id

\AUTO_LINK

The category ID we are browsing in

$max

integer

The maximum number of rows to show per browser page

$max_rows

integer

The maximum number of rows in the entire dataset

$type

\ID_TEXT

The page type this browser is browsing through (e.g. 'category')

$max_page_links

integer

The maximum number of quick-jump page-links to show

Returns

\TempcodeThe results launcher

Get the Tempcode for a results sorter.

results_sorter(\?array $sortables, \?ID_TEXT $sortable = null, \?ID_TEXT $sort_order = null, \?ID_TEXT $sort_name = 'sort', \?ID_TEXT $hash = '') : \Tempcode
package core_abstract_interfaces
set ASC DESC

Parameters

$sortables

\?array

A map of sortable code (usually, db field names), to strings giving the human name for the sort order (null: no sortables)

$sortable

\?ID_TEXT

The current sortable (null: none)

$sort_order

\?ID_TEXT

The order we are sorting in (null: none)

$sort_name

\?ID_TEXT

The parameter name used to store our sortable (usually 'sort') (null: none)

$hash

\?ID_TEXT

URL hash component (null: none)

Returns

\TempcodeThe results sorter

Get the Tempcode for a results table.

results_table(mixed $text_id, integer $start, \ID_TEXT $start_name, integer $max, \ID_TEXT $max_name, integer $max_rows, \Tempcode $fields_title, \Tempcode $fields, \?array $sortables = null, \?ID_TEXT $sortable = null, \?ID_TEXT $sort_order = null, \?ID_TEXT $sort_name = 'sort', \?Tempcode $message = null, \?array $widths = null, \?string $tplset = null, integer $max_page_links = 8, string $guid = '1c8645bc2a3ff5bec2e003142185561f', boolean $skip_sortables_form = false, \?ID_TEXT $hash = null) : \Tempcode
package core_abstract_interfaces
set ASC DESC

Parameters

$text_id

mixed

Some text/word describing what is being browsed (Tempcode or string)

$start

integer

The result number our table starts at (x of n)

$start_name

\ID_TEXT

The parameter name used to store our position in the results (usually, 'start')

$max

integer

The total number of results to show per-page

$max_name

\ID_TEXT

The parameter name used to store the total number of results to show per-page (usually, 'max')

$max_rows

integer

The maximum number of rows in the entire dataset

$fields_title

\Tempcode

The titles of the fields we are showing in our table, presented in preprepared Tempcode

$fields

\Tempcode

The values of the fields we are showing in our table

$sortables

\?array

A map of sortable code (usually, db field names), to strings giving the human name for the sort order (null: no sortables)

$sortable

\?ID_TEXT

The current sortable (null: none)

$sort_order

\?ID_TEXT

The order we are sorting in (null: none)

$sort_name

\?ID_TEXT

The parameter name used to store our sortable (usually 'sort') (null: none)

$message

\?Tempcode

Message to show (null: auto)

$widths

\?array

Widths to specify to the table (null: none sent)

$tplset

\?string

The template set to use (null: default)

$max_page_links

integer

The maximum number of quick-jump page-links to show

$guid

string

GUID to pass to template

$skip_sortables_form

boolean

Whether to skip showing a sort form (useful if there is another form wrapped around this)

$hash

\?ID_TEXT

URL hash component (null: none)

Returns

\TempcodeThe results table

Get Tempcode for cropped text, that fully reveals itself on mouse-over.

tpl_crop_text_mouse_over(string $text, integer $len) : \Tempcode
package core_abstract_interfaces

Parameters

$text

string

The text

$len

integer

The length to crop at

Returns

\TempcodeThe cropped text