class ActionsTicket extends CommonHookActions (View source)

Class Actions of the module ticket

Properties

?string $resprints from  CommonHookActions
mixed|mixed[][] $results from  CommonHookActions
string $error
string[] $errors
string[] $warnings from  CommonHookActions
DoliDB $db
Ticket $dao
string $mesg
int $errno
string $template_dir
string $template
string $label
string $description
int $fk_statut
int $fk_soc

Methods

bool
isContext(array<string, mixed> $parameters, string[]|string $allContexts)

Check context of hook

__construct($db)

Constructor

void
getInstanceDao()

Instantiation of DAO class

int
fetch(int $id = 0, string $ref = '', string $track_id = '')

Fetch object

string
getLibStatut(int $mode = 0)

Print statut

void
getInfo(int $id)

Get ticket info

string
getTitle(string $action = '', Ticket|null $object = null)

Get action title

void
viewTicketOriginalMessage(User $user, string $action, Ticket $object)

Show ticket original message

void
viewTicketMessages(bool $show_private, bool $show_user, Ticket $object)

View html list of message for ticket

void
viewTicketTimelineMessages(bool $show_private, bool $show_user, Ticket $object)

View list of message for ticket with timeline display

void
viewStatusActions(Ticket $object)

Print html navbar with link to set ticket status

Details

protected bool isContext(array<string, mixed> $parameters, string[]|string $allContexts)

Check context of hook

Parameters

array<string, mixed> $parameters

Hook parameters.

string[]|string $allContexts

Context to check

Return Value

bool

__construct($db)

Constructor

@param DoliDB $db Database handler

Parameters

$db

void getInstanceDao()

Instantiation of DAO class

Return Value

void

int fetch(int $id = 0, string $ref = '', string $track_id = '')

Fetch object

Parameters

int $id

ID of ticket

string $ref

Reference of ticket

string $track_id

Track ID of ticket (for public area)

Return Value

int

Return integer <0 if KO, >0 if OK

string getLibStatut(int $mode = 0)

Print statut

Parameters

int $mode

Display mode

Return Value

string

Label of status

void getInfo(int $id)

Get ticket info

Parameters

int $id

Object id

Return Value

void

string getTitle(string $action = '', Ticket|null $object = null)

Get action title

Parameters

string $action

Type of action

Ticket|null $object

Object ticket

Return Value

string

Title of action

void viewTicketOriginalMessage(User $user, string $action, Ticket $object)

Show ticket original message

Parameters

User $user

User which display

string $action

Action mode

Ticket $object

Object ticket

Return Value

void

void viewTicketMessages(bool $show_private, bool $show_user, Ticket $object)

View html list of message for ticket

Parameters

bool $show_private

Show private messages

bool $show_user

Show user who make action

Ticket $object

Object ticket

Return Value

void

void viewTicketTimelineMessages(bool $show_private, bool $show_user, Ticket $object)

View list of message for ticket with timeline display

Parameters

bool $show_private

Show private messages

bool $show_user

Show user who make action

Ticket $object

Object ticket

Return Value

void

void viewStatusActions(Ticket $object)

Print html navbar with link to set ticket status

Parameters

Ticket $object

Ticket sup

Return Value

void