dolibarr 25.0.0-alpha
FormWebsite Class Reference

Class to manage component html for module website. More...

Public Member Functions

 __construct ($db)
 Constructor.
 
 selectWebsite ($selected='', $htmlname='exportmodelid', $useempty=0)
 Return HTML select list of websites.
 
 selectTypeOfContainer ($htmlname, $selected='', $useempty=0, $moreattrib='', $addjscombo=0, $morecss='minwidth200')
 Return a HTML select list of type of containers from the dictionary.
 
 selectSampleOfContainer ($htmlname, $selected='', $useempty=0, $moreattrib='', $addjscombo=0, $morecss='minwidth200')
 Return a HTML select list of samples of containers content.
 
 selectContainer ($website, $htmlname='pageid', $pageid=0, $showempty=0, $action='', $morecss='minwidth200', $excludeids=null)
 Return a HTML select list of containers of a website.
 
 getContentPageTemplate ($htmlContent='message')
 Return HTML code for selection of page layout.
 

Static Public Member Functions

static compareTypeOfContainer ($a, $b)
 Compare 2 types of container to sort them by group of type, then position, then label.
 

Detailed Description

Class to manage component html for module website.

Definition at line 29 of file html.formwebsite.class.php.

Constructor & Destructor Documentation

◆ __construct()

FormWebsite::__construct ( $db)

Constructor.

Parameters
DoliDB$dbDatabase handler

Definition at line 52 of file html.formwebsite.class.php.

Member Function Documentation

◆ compareTypeOfContainer()

static FormWebsite::compareTypeOfContainer ( $a,
$b )
static

Compare 2 types of container to sort them by group of type, then position, then label.

Used as callback of usort() by selectTypeOfContainer().

Parameters
stdClass$aFirst record of c_type_container
stdClass$bSecond record of c_type_container
Returns
int Negative if $a is before $b, positive if $a is after $b, 0 if equal

Definition at line 211 of file html.formwebsite.class.php.

◆ getContentPageTemplate()

FormWebsite::getContentPageTemplate ( $htmlContent = 'message')

Return HTML code for selection of page layout.

Parameters
string$htmlContentHTML name of WYSIWYG field
Returns
string HTML for model page boxes
See also
getEmailLayoutSelector()

Definition at line 384 of file html.formwebsite.class.php.

References dol_dir_list(), dol_sanitizeFileName(), and make_substitutions().

◆ selectContainer()

FormWebsite::selectContainer ( $website,
$htmlname = 'pageid',
$pageid = 0,
$showempty = 0,
$action = '',
$morecss = 'minwidth200',
$excludeids = null )

Return a HTML select list of containers of a website.

Note: $website->lines must have been loaded.

Parameters
Website$websiteObject Website
string$htmlnameName of select zone
int$pageidPreselected container ID
int<0,1>$showempty Show empty record
string$actionAction on page that use this select list
string$morecssMore CSS
?array<int|string>$excludeids Exclude some ID in list
Returns
string HTML select component with list of block containers

Definition at line 297 of file html.formwebsite.class.php.

References $conf, and ajax_combobox().

◆ selectSampleOfContainer()

FormWebsite::selectSampleOfContainer ( $htmlname,
$selected = '',
$useempty = 0,
$moreattrib = '',
$addjscombo = 0,
$morecss = 'minwidth200' )

Return a HTML select list of samples of containers content.

Parameters
string$htmlnameName of select zone
string$selectedSelected value
int$useempty1=Add an empty value in list
string$moreattribMore attributes on HTML select tag
int$addjscomboAdd js combo
string$morecssMore css
Returns
string HTML select component with list of type of containers

Definition at line 237 of file html.formwebsite.class.php.

References ajax_combobox(), and dol_dir_list().

◆ selectTypeOfContainer()

FormWebsite::selectTypeOfContainer ( $htmlname,
$selected = '',
$useempty = 0,
$moreattrib = '',
$addjscombo = 0,
$morecss = 'minwidth200' )

Return a HTML select list of type of containers from the dictionary.

Parameters
string$htmlnameName of select zone
string$selectedSelected value
int$useempty1=Add an empty value in list, 2=Add an empty value in list only if there is more than 2 entries.
string$moreattribMore attributes on HTML select tag
int$addjscomboAdd js combo
string$morecssMore CSS
Returns
string The HTML select component

Definition at line 114 of file html.formwebsite.class.php.

References $conf, ajax_combobox(), dol_syslog(), and info_admin().

◆ selectWebsite()

FormWebsite::selectWebsite ( $selected = '',
$htmlname = 'exportmodelid',
$useempty = 0 )

Return HTML select list of websites.

Parameters
string$selectedId modele pre-selectionne
string$htmlnameName of HTML select
int$useemptyShow empty value or not
Returns
string Html component

Definition at line 66 of file html.formwebsite.class.php.


The documentation for this class was generated from the following file: