dolibarr 20.0.0
|
Class to manage canvas. More...
Public Member Functions | |
__construct ($db, $actiontype='view') | |
Constructor. | |
getCanvas ($module, $card, $canvas) | |
Initialize properties: ->targetmodule, ->canvas, ->card, ->dirmodule, ->template_dir. | |
assign_values (&$action='view', $id=0, $ref='') | |
Shared method for canvas to assign values for templates. | |
displayCanvasExists ($action) | |
Return if a template exists to display as canvas (if it exists) | |
display_canvas ($action) | |
Display a canvas page. | |
hasActions () | |
Return if a canvas contains an action controller. | |
doActions (&$action='view', $id=0) | |
Shared method for canvas to execute actions. | |
Private Member Functions | |
_cleanaction ($action) | |
Return action code cleaned. | |
Class to manage canvas.
Definition at line 29 of file canvas.class.php.
Canvas::__construct | ( | $db, | |
$actiontype = 'view' ) |
Constructor.
DoliDB | $db | Database handler |
string | $actiontype | Action type ('create', 'view', 'edit', 'list') |
Definition at line 63 of file canvas.class.php.
References _cleanaction().
|
private |
Return action code cleaned.
string | $action | Action type ('create', 'view', 'edit', 'list', 'add', 'update') |
Definition at line 76 of file canvas.class.php.
Referenced by __construct(), display_canvas(), and displayCanvasExists().
Canvas::assign_values | ( | & | $action = 'view', |
$id = 0, | |||
$ref = '' ) |
Shared method for canvas to assign values for templates.
string | $action | Action string |
int | $id | Object id (if ref not provided) |
string | $ref | Object ref (if id not provided) |
Definition at line 150 of file canvas.class.php.
Canvas::display_canvas | ( | $action | ) |
Display a canvas page.
This will include the template for output. Variables used by templates may have been defined or loaded before into the assign_values function.
string | $action | Action code |
Definition at line 186 of file canvas.class.php.
References _cleanaction().
Canvas::displayCanvasExists | ( | $action | ) |
Return if a template exists to display as canvas (if it exists)
string | $action | Action code |
Definition at line 164 of file canvas.class.php.
References _cleanaction().
Canvas::doActions | ( | & | $action = 'view', |
$id = 0 ) |
Shared method for canvas to execute actions.
string | $action | Action string |
int | $id | Object id |
Definition at line 221 of file canvas.class.php.
Canvas::getCanvas | ( | $module, | |
$card, | |||
$canvas ) |
Initialize properties: ->targetmodule, ->canvas, ->card, ->dirmodule, ->template_dir.
string | $module | Name of target module (thirdparty, contact, ...) |
string | $card | Tab name of card (ex: 'card', 'info', 'contactcard', ...) or '' for a list page |
string | $canvas | Name of canvas (ex: mycanvas, default, or mycanvas@myexternalmodule) |
Definition at line 100 of file canvas.class.php.
References dol_buildpath().
Canvas::hasActions | ( | ) |
Return if a canvas contains an action controller.
Definition at line 205 of file canvas.class.php.