ListPage
class ListPage extends FormPage (View source)
ListPage class
Properties
protected string | $head | from Page | |
protected string | $title | from Page | |
protected string | $access_permission | from Page | |
protected array | $tabs | from Page | |
protected array | $main_subtitle | from Page | |
protected string | $tabs_picture | from Page | |
protected string | $tabs_title | from Page | |
protected string | $active_tab | from Page | |
protected boolean | $close_form | from Page | |
protected boolean | $close_table | from Page | |
protected boolean | $add_fiche_end | from Page | |
protected string | $rights_class | from Page | |
protected string | $modulepart | from Page | |
protected array | $assets | from Page | |
object | $form | from FormPage | |
protected string | $body | from FormPage | |
protected array | $fields | from FormPage | |
protected array | $arrayfields | ||
protected string | $contextpage | ||
protected object | $extrafields | ||
protected array | $extralabels | ||
protected array | $search_array_options |
Methods
Constructor
Add a subtitle
Opens a new html table
Close table row
Add a table column
Include a template into the page.
Load default actions
Check specified field
Show a confirmation message
Open list / print list head
Add extrafields columns
Fetch extrafields
Add buttons to the list
Close list
Details
at line 56
__construct($page_title, $access_perm = '', $contextpage = '')
Constructor
$this
setTitle($page_title)
Set page title.
Note: this function should be called before $page->begin() function, otherwise it will not work as expected.
$this
setMainSubtitle($title, $picture = 'title_generic.png')
Set page main subtitle.
Note: this function should be called before $page->begin() function, otherwise it will not work as expected.
$this
loadLangs($lang_files_array, $from_module = false)
Load an array of language files
$this
appendToHead($content)
Append content to page head.
Note: this function should be called before $page->begin() function, otherwise it will not work as expected.
$this
addJsFile($js_file)
Add JS file to page head.
Note: this function should be called before $page->begin() function, otherwise it will not work as expected.
$this
addJsFiles($js_files_array)
Add an array of JS files.
Note: this function should be called before $page->begin() function, otherwise it will not work as expected.
$this
addCssFile($css_file)
Add CSS file to page head.
Note: this function should be called before $page->begin() function, otherwise it will not work as expected.
$this
addCssFiles($css_files_array)
Add an array of CSS files.
Note: this function should be called before $page->begin() function, otherwise it will not work as expected.
$this
addTab($title, $url, $is_active = false, $position = -1)
Add a tab to the page.
Note: this function should be called before $page->begin() function, otherwise it will not work as expected.
$this
setTabsPicture($picture)
Set tabs picture.
Note: this function should be called before $page->begin() function, otherwise it will not work as expected.
$this
setTabsTitle($title)
Set tabs title.
Note: this function should be called before $page->begin() function, otherwise it will not work as expected.
$this
addSubTitle($title, $picture = 'title_generic.png', $morehtmlright = '')
Add a subtitle
$this
openForm($action = 'create', $enctype = '')
Open a form only if not already opened
$this
openTable($header_columns = array(), $attr = 'class="noborder allwidth"', $print_fiche_head = false, $summary = '')
Opens a new html table
at line 436
$this
closeRow()
Close table row
at line 280
$this
addColumn($field_name, $content, $attr = '')
Add a table column
$this
showTemplate($template_path, $path_is_absolute = false, $use_require_once = false, $template_params = array())
Include a template into the page.
Note: the template should be inside module tpl folder when $path_is_absolute parameter equal false.
at line 71
protected
loadDefaultActions()
Load default actions
redirect($url)
Redirect to a url (alias for dolibase_redirect function).
Note: this function should be called before any output, so before $page->begin() function.
end()
Generate page end.
Note: this function should be called after $page->begin() call.
boolean|int
checkField($field_name, $field_trans = '', $field_validation_rules = '', $return_err_number = false)
Check specified field
$this
askForConfirmation($url, $title, $question, $action, $question_param = '', $dialog_id_suffix = '')
Show a confirmation message
at line 106
$this
openList($title, $picture = 'title_generic.png', $list_fields, $search_fields, $nbofshownrecords, $nbtotalofrecords, $fieldstosearchall = array(), $sortfield = '', $sortorder = '', $morehtmlright = '')
Open list / print list head
at line 295
$this
addExtraFields($obj)
Add extrafields columns
at line 334
$this
fetchExtraFields($elementtype, $qb)
Fetch extrafields
at line 393
protected $this
addButtons($buttons, $hide_buttons)
Add buttons to the list
at line 418
$this
closeList($buttons = array(), $hide_buttons = false)
Close list