class ActionsCardIndividual extends ActionsCardCommon (View source)

ActionsCardIndividual

Class with controller methods for individual canvas

Properties

DoliDB $db from  ActionsCardCommon
string $dirmodule from  ActionsCardCommon
string $targetmodule from  ActionsCardCommon
string $canvas from  ActionsCardCommon
string $card from  ActionsCardCommon
array<string, mixed> $tpl from  ActionsCardCommon
Societe $object from  ActionsCardCommon
string $error from  ActionsCardCommon
string[] $errors from  ActionsCardCommon

Methods

getObject($id, string $ref = '')

Get object from id or ref and save it into this->object

assign_values($action, int $id = 0, $ref = '')

Assign custom values for canvas (for example into this->tpl to be used by templates)

__construct($db, string $dirmodule, $targetmodule, $canvas, $card)

Constructor

restrictedArea($user, string $features = 'societe', $objectid = 0, $dbtablename = '', $feature2 = '', $dbt_keyfield = 'fk_soc', $dbt_select = 'rowid')

Check permissions of a user to show a page and an object. Check read permission If $_REQUEST['action'] defined, we also check write permission.

Details

protected getObject($id, string $ref = '')

Get object from id or ref and save it into this->object

@param int $id Object id

Parameters

$id
string $ref

Object ref @return Societe Object loaded

assign_values($action, int $id = 0, $ref = '')

Assign custom values for canvas (for example into this->tpl to be used by templates)

@param string $action Type of action

Parameters

$action
int $id

Id of object @param string $ref Ref of object @return void

$ref

__construct($db, string $dirmodule, $targetmodule, $canvas, $card)

Constructor

@param DoliDB $db Handler access base de donnees

Parameters

$db
string $dirmodule

Name of directory of module @param string $targetmodule Name of directory of module where canvas is stored @param string $canvas Name of canvas @param string $card Name of tab (sub-canvas)

$targetmodule
$canvas
$card

restrictedArea($user, string $features = 'societe', $objectid = 0, $dbtablename = '', $feature2 = '', $dbt_keyfield = 'fk_soc', $dbt_select = 'rowid')

Check permissions of a user to show a page and an object. Check read permission If $_REQUEST['action'] defined, we also check write permission.

@param      User    $user           User to check

Parameters

$user
string $features

Features to check (in most cases, it's module name) @param int $objectid Object ID if we want to check permission on a particular record (optional) @param string $dbtablename Table name where object is stored. Not used if objectid is null (optional) @param string $feature2 Feature to check (second level of permission) @param string $dbt_keyfield Field name for socid foreign key if not fk_soc. (optional) @param string $dbt_select Field name for select if not rowid. (optional) @return int 1

$objectid
$dbtablename
$feature2
$dbt_keyfield
$dbt_select