dolibarr 21.0.0-alpha
|
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 30 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 85 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 98 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 172 of file canvas.class.php.
References $id.
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 208 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 186 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 243 of file canvas.class.php.
References $id.
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 122 of file canvas.class.php.
References dol_buildpath().
Canvas::hasActions | ( | ) |
Return if a canvas contains an action controller.
Definition at line 227 of file canvas.class.php.