dolibarr
x.y.z
|
Class to manage canvas. More...
Public Member Functions | |
__construct ($db, $actiontype='view') | |
Constructor. More... | |
getCanvas ($module, $card, $canvas) | |
Initialize properties: ->targetmodule, ->canvas, ->card, ->dirmodule, ->template_dir. More... | |
assign_values (&$action='view', $id=0, $ref='') | |
Shared method for canvas to assign values for templates. More... | |
displayCanvasExists ($action) | |
Return if a template exists to display as canvas (if it exists) More... | |
display_canvas ($action) | |
Display a canvas page. More... | |
hasActions () | |
Return if a canvas contains an action controller. More... | |
doActions (&$action='view', $id=0) | |
Shared method for canvas to execute actions. More... | |
Private Member Functions | |
_cleanaction ($action) | |
Return action code cleaned. More... | |
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(), and db.
|
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().
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 151 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 187 of file canvas.class.php.
Canvas::displayCanvasExists | ( | $action | ) |
Return if a template exists to display as canvas (if it exists)
string | $action | Action code |
Definition at line 165 of file canvas.class.php.
Canvas::doActions | ( | & | $action = 'view' , |
$id = 0 |
|||
) |
Shared method for canvas to execute actions.
string | $action | Action string |
int | $id | Object id |
Definition at line 222 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.
Canvas::hasActions | ( | ) |
Return if a canvas contains an action controller.
Definition at line 206 of file canvas.class.php.