FormTicket
class FormTicket (View source)
Class to generate the form for creating a new ticket.
Usage: $formticket = new FormTicket($db) $formticket->proprietes = 1 or string or array of values $formticket->show_form() shows the form
Properties
| DoliDB | $db | ||
| string | $track_id | ||
| string | $trackid | ||
| int | $fk_user_create | ||
| string | $message | ||
| string | $topic_title | ||
| string | $action | ||
| int<0, 1> | $withtopic | ||
| int<0, 1> | $withemail | ||
| int<0, 1> | $withsubstit | ||
| int<0, 2> | $withfile | ||
| int<0, 1> | $withfilereadonly | ||
| string | $backtopage | ||
| int<0, 1> | $ispublic | ||
| int<0, 1> | $withtitletopic | ||
| int<0, 1> | $withtopicreadonly | ||
| int<0, 1> | $withreadid | ||
| int<0, 1> | $withcompany | ||
| int<0, 1> | $withfromsocid | ||
| int<0, 1> | $withfromcontactid | ||
| int<0, 1> | $withnotifytiersatcreate | ||
| int<0, 1> | $withusercreate | ||
| int<0, 1> | $withcreatereadonly | ||
| int<0, 1> | $withextrafields | ||
| int<0, 1> | $withref | ||
| int<0, 1> | $withcancel | ||
| string | $type_code | ||
| string | $category_code | ||
| string | $severity_code | ||
| array<string, string> | $substit | ||
| array<string, mixed|array> | $param | ||
| string | $error | ||
| string[] | $errors |
Methods
Check required fields
Show the form to input ticket
Return html list of tickets type
Return html list of ticket analytic codes
Return html list of ticket severitys (priorities)
Clear list of attached files in send mail form (also stored in session)
Show the form to add message on ticket
Details
__construct(DoliDB $db)
Constructor
static void
checkRequiredFields(array $fields, int $errors)
Check required fields
void
showForm(int $withdolfichehead = 0, "create"|"edit" $mode = 'edit', int<0, 1> $public = 0, Contact $with_contact = null, string $action = '', Ticket $object = null)
Show the form to input ticket
selectTypesTickets($selected = '', string $htmlname = 'tickettype', $filtertype = '', $format = 0, $empty = 0, $noadmininfo = 0, $maxlength = 0, $morecss = '', $multiselect = 0)
Return html list of tickets type
@param string|int[] $selected Id of preselected field or array of Ids
selectGroupTickets($selected = '', string $htmlname = 'ticketcategory', $filtertype = '', $format = 0, $empty = 0, $noadmininfo = 0, $maxlength = 0, $morecss = '', $use_multilevel = 0, $outputlangs = null)
Return html list of ticket analytic codes
@param string $selected Id pre-selected category
selectSeveritiesTickets($selected = '', string $htmlname = 'ticketseverity', $filtertype = '', $format = 0, $empty = 0, $noadmininfo = 0, $maxlength = 0, $morecss = '')
Return html list of ticket severitys (priorities)
@param string $selected Id severity pre-selected
void
clear_attached_files()
Clear list of attached files in send mail form (also stored in session)
void
showMessageForm(string $width = '40%')
Show the form to add message on ticket