dolibarr  7.0.0-beta
Public Member Functions | Private Member Functions | List of all members
ActionsCardIndividual Class Reference

Class with controller methods for individual canvas. More...

+ Inheritance diagram for ActionsCardIndividual:
+ Collaboration diagram for ActionsCardIndividual:

Public Member Functions

 __construct ($db, $dirmodule, $targetmodule, $canvas, $card)
 Constructor. More...
 
 doActions (&$action, $id)
 Execute actions. More...
 
 assign_values (&$action, $id=0, $ref='')
 Assign custom values for canvas (for example into this->tpl to be used by templates) More...
 
 restrictedArea ($user, $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. More...
 
- Public Member Functions inherited from ActionsCardCommon
 doActions (&$action)
 doActions of a canvas is not the doActions of the hook More...
 
 assign_values (&$action, $id=0, $ref='')
 Assign custom values for canvas (for example into this->tpl to be used by templates) More...
 

Private Member Functions

 getTitle ($action)
 Return the title of card. More...
 

Additional Inherited Members

- Public Attributes inherited from ActionsCardCommon
 $tpl = array()
 Template container.
 
 $object
 Object container.
 
 $error
 Error string.
 
 $errors =array()
 Error array.
 
- Protected Member Functions inherited from ActionsCardCommon
 getObject ($id, $ref='')
 Get object from id or ref and save it into this->object. More...
 

Detailed Description

Class with controller methods for individual canvas.

Definition at line 29 of file actions_card_individual.class.php.

Constructor & Destructor Documentation

ActionsCardIndividual::__construct (   $db,
  $dirmodule,
  $targetmodule,
  $canvas,
  $card 
)

Constructor.

Parameters
DoliDB$dbHandler acces base de donnees
string$dirmoduleName of directory of module
string$targetmoduleName of directory of module where canvas is stored
string$canvasName of canvas
string$cardName of tab (sub-canvas)

Definition at line 40 of file actions_card_individual.class.php.

Member Function Documentation

ActionsCardIndividual::assign_values ( $action,
  $id = 0,
  $ref = '' 
)

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

Parameters
string$actionType of action
integer$idId of object
string$refRef of object
Returns
void

Definition at line 95 of file actions_card_individual.class.php.

References $form, ActionsCardCommon\getObject(), GETPOST(), getTitle(), and load_fiche_titre().

ActionsCardIndividual::doActions ( $action,
  $id 
)

Execute actions.

Deprecated:
Use the doActions of hooks instead of this.
Parameters
string$actionAction
int$idId of object (may be empty for creation)
Returns
int <0 if KO, >0 if OK

Definition at line 78 of file actions_card_individual.class.php.

References ActionsCardCommon\getObject().

ActionsCardIndividual::getTitle (   $action)
private

Return the title of card.

Parameters
string$actionAction code
Returns
string Title

Definition at line 56 of file actions_card_individual.class.php.

Referenced by assign_values().

ActionsCardIndividual::restrictedArea (   $user,
  $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.

Parameters
User$userUser to check
string$featuresFeatures to check (in most cases, it's module name)
int$objectidObject ID if we want to check permission on a particular record (optional)
string$dbtablenameTable name where object is stored. Not used if objectid is null (optional)
string$feature2Feature to check (second level of permission)
string$dbt_keyfieldField name for socid foreign key if not fk_soc. (optional)
string$dbt_selectField name for select if not rowid. (optional)
Returns
int 1

Definition at line 133 of file actions_card_individual.class.php.


The documentation for this class was generated from the following file: