Page
class Page (View source)
Page class
Properties
protected string | $head | ||
protected string | $title | ||
protected string | $access_permission | ||
protected array | $tabs | ||
protected array | $main_subtitle | ||
protected string | $tabs_picture | ||
protected string | $tabs_title | ||
protected string | $active_tab | ||
protected boolean | $close_form | ||
protected boolean | $close_table | ||
protected boolean | $add_fiche_end | ||
protected string | $rights_class | ||
protected string | $modulepart | ||
protected array | $assets |
Methods
Constructor
Set page title.
Set page main subtitle.
Load a language file
Load an array of language files
Append content to page head.
Add JS file to page head.
Add an array of JS files.
Add CSS file to page head.
Add an array of CSS files.
Add a tab to the page.
Set tabs picture.
Set tabs title.
Generate tabs
Add a subtitle
Open a form only if not already opened
Close an opened form
Opens a new html table
Close an opened html table
Open a table row
Close a table row
Add a table column
Add a line break (or many)
Return template absolute path
Include a template into the page.
Show page_under_construction template (only once)
Show page_not_found template (only once)
Load default actions
Generate page beginning
Generate page body
Redirect to a url (alias for dolibase_redirect function).
Generate page end.
Details
at line 91
__construct($page_title, $access_perm = '')
Constructor
at line 126
$this
setTitle($page_title)
Set page title.
Note: this function should be called before $page->begin() function, otherwise it will not work as expected.
at line 141
$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.
at line 155
$this
loadLang($lang_file, $is_module_file = true)
Load a language file
at line 175
$this
loadLangs($lang_files_array, $from_module = false)
Load an array of language files
at line 191
$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.
at line 205
$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.
at line 223
$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.
at line 239
$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.
at line 257
$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.
at line 276
$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.
at line 310
$this
setTabsPicture($picture)
Set tabs picture.
Note: this function should be called before $page->begin() function, otherwise it will not work as expected.
at line 324
$this
setTabsTitle($title)
Set tabs title.
Note: this function should be called before $page->begin() function, otherwise it will not work as expected.
at line 338
protected
generateTabs($noheader)
Generate tabs
at line 371
$this
addSubTitle($title, $picture = 'title_generic.png', $morehtmlright = '')
Add a subtitle
at line 389
$this
openForm($action = 'create', $enctype = '')
Open a form only if not already opened
at line 410
$this
closeForm()
Close an opened form
at line 434
$this
openTable($header_columns = array(), $attr = 'class="noborder allwidth"', $print_fiche_head = false, $summary = '')
Opens a new html table
at line 473
$this
closeTable($print_fiche_end = false)
Close an opened html table
at line 498
$this
openRow($odd = true, $more_attr = '')
Open a table row
at line 512
$this
closeRow()
Close a table row
at line 526
$this
addColumn($content, $attr = '')
Add a table column
at line 539
$this
addLineBreak($repeat)
Add a line break (or many)
at line 558
protected string
getTemplatePath($template)
Return template absolute path
at line 577
$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 604
$this
underConstruction()
Show page_under_construction template (only once)
at line 618
$this
notFound()
Show page_not_found template (only once)
at line 631
protected
loadDefaultActions()
Load default actions
at line 641
$this
begin()
Generate page beginning
at line 661
protected
generate()
Generate page body
at line 677
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.
at line 687
end()
Generate page end.
Note: this function should be called after $page->begin() call.