Platform  3.1
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
Action Class Reference
+ Inheritance diagram for Action:
+ Collaboration diagram for Action:

Public Member Functions

 Set ($name, &$parent)
 
 CompleteSet (&$parent)
 
 Complete ()
 
 Read ($k, $d="")
 
 Register ($k, $v)
 
 Unregister ($k)
 
 ActRead ($k, $d="")
 
 ActRegister ($k, $v)
 
 ActUnregister ($k)
 
 PreInsert ()
 
 PreUpdate ()
 
 GetParam ($name, $def="")
 
 setParamU ($name, $val)
 
 GetImageUrl ($name, $detectstyle=true, $size=null)
 
 GetFilteredImageUrl ($name)
 
 GetImageFile ($name)
 
 AddLogMsg ($msg, $cut=80)
 
 AddWarningMsg ($msg)
 
 AddActionDone ($actdone, $arg="")
 
 ClearActionDone ()
 
 GetActionDone (&$actdone, &$arg)
 
 GetIcon ($name, $text, $width="", $height="")
 
 GetLayoutFile ($layname)
 
 Exists ($name, $idapp, $id_func= '')
 
 HasPermission ($acl_name="", $app_name="")
 
 canExecute ($actname, $appid="")
 
 GetAcl ($actname, $appid="")
 
 execute ()
 
 ExitError ($texterr)
 
 exitForbidden ($texterr)
 
 ClearError ()
 
 Init ($app, $action_desc, $update=FALSE)
 
 Text ($code, $args=NULL)
 
 debug ($msg)
 
 info ($msg)
 
 warning ($msg)
 
 error ($msg)
 
 fatal ($msg)
 
 AppInstalled ($appname)
 
 GetAvailableApplication ()
 
- Public Member Functions inherited from DbObj
 __construct ($dbaccess= '', $id= '', $res= '', $dbid=0)
 
 Select ($id)
 
 getValues ()
 
 AffectColumn ($fields)
 
 Affect ($array)
 
 isAffected ()
 
 Complete ()
 
 PreInsert ()
 
 PostInsert ()
 
 PreUpdate ()
 
 PostUpdate ()
 
 PreDelete ()
 
 PostDelete ()
 
 PreSelect ($id)
 
 PostSelect ($id)
 
 Add ($nopost=false, $nopre=false)
 
 Modify ($nopost=false, $sfields="", $nopre=false)
 
 Delete ($nopost=false)
 
 Adds (&$tcopy, $nopost=false)
 
 lw ($prop)
 
 CloseConnect ()
 
 Create ($nopost=false)
 
 PostInit ()
 
 init_dbid ()
 
 exec_query ($sql, $lvl=0, $prepare=false)
 
 numrows ()
 
 fetch_array ($c, $type=PGSQL_ASSOC)
 
 Update ()
 
 savePoint ($point)
 
 rollbackPoint ($point)
 
 commitPoint ($point)
 

Static Public Member Functions

static getArgument ($k, $def= '')
 

Data Fields

 $fields
 
 $id_fields
 
 $idx
 
 $dbtable = "action"
 
 $sqlcreate
 
 $parent
 
 $def
 
 $criterias
 
 $grant_level = 0
 
- Data Fields inherited from DbObj
 $dbid = - 1
 
 $dbaccess = ''
 
 $fields
 
 $dbtable = ''
 
 $criterias = array()
 
 $sup_fields = array()
 
 $sup_where = array()
 
 $sup_tables = array()
 
 $fulltextfields = array()
 
 $order_by = ""
 
 $isset = false
 
 $msg_err = ''
 
 $err_code = ''
 
 $res = null
 
 $debug = false
 

Additional Inherited Members

- Static Public Attributes inherited from DbObj
static $savepoint = array()
 

Detailed Description

Definition at line 27 of file Class.Action.php.

Member Function Documentation

ActRead (   $k,
  $d = "" 
)

Definition at line 178 of file Class.Action.php.

+ Here is the call graph for this function:

ActRegister (   $k,
  $v 
)

Definition at line 183 of file Class.Action.php.

+ Here is the call graph for this function:

ActUnregister (   $k)

Definition at line 188 of file Class.Action.php.

+ Here is the call graph for this function:

AddActionDone (   $actdone,
  $arg = "" 
)

store action done to be use in refreshing main window interface

Parameters
string$actdonethe code of action
string$argsthe argument of action

Definition at line 263 of file Class.Action.php.

AddLogMsg (   $msg,
  $cut = 80 
)

Definition at line 245 of file Class.Action.php.

AddWarningMsg (   $msg)

Definition at line 252 of file Class.Action.php.

AppInstalled (   $appname)

verify if the application is really installed in localhost

Returns
bool true if application is installed

Definition at line 622 of file Class.Action.php.

canExecute (   $actname,
  $appid = "" 
)

return true if user can execute the specified action

Parameters
string$actnameaction name
string$appidapplication name or id (default itself)
Returns
string error message (empty if no error)

Definition at line 344 of file Class.Action.php.

ClearActionDone ( )

clear action done to be use in refreshing main window interface

Parameters
string$actdonethe code of action
string$argsthe argument of action

Definition at line 279 of file Class.Action.php.

ClearError ( )

unregister FT error

Definition at line 497 of file Class.Action.php.

+ Here is the call graph for this function:

Complete ( )

Definition at line 152 of file Class.Action.php.

CompleteSet ( $parent)

Definition at line 133 of file Class.Action.php.

+ Here is the call graph for this function:

debug (   $msg)

Definition at line 598 of file Class.Action.php.

error (   $msg)

Definition at line 610 of file Class.Action.php.

execute ( )

execute the action

Returns
string the composed associated layout

Definition at line 383 of file Class.Action.php.

+ Here is the call graph for this function:

Exists (   $name,
  $idapp,
  $id_func = '' 
)

Definition at line 309 of file Class.Action.php.

ExitError (   $texterr)

display error to user and stop execution

Parameters
string$texterrthe error message

Definition at line 466 of file Class.Action.php.

exitForbidden (   $texterr)

Definition at line 487 of file Class.Action.php.

fatal (   $msg)

Definition at line 614 of file Class.Action.php.

GetAcl (   $actname,
  $appid = "" 
)

return id from name for an application

Parameters
string$actnameaction name
string$appidapplication id (default itself)
Returns
string (false if not found)

Definition at line 369 of file Class.Action.php.

GetActionDone ( $actdone,
$arg 
)

get action code and argument for action code done to be use in refreshing main window interface

Parameters
string&$actdonethe code of action
string&$argsthe argument of action

Definition at line 290 of file Class.Action.php.

static getArgument (   $k,
  $def = '' 
)
static

retrieve the value of an argument fot the action in web mode the value comes from http variable and in shell mode comes from args variable

Parameters
string$kthe argument name
any$defdefault value if no argument is not set

Definition at line 585 of file Class.Action.php.

GetAvailableApplication ( )

return available Applications for current user

Returns
array

Definition at line 633 of file Class.Action.php.

+ Here is the call graph for this function:

GetFilteredImageUrl (   $name)

Definition at line 231 of file Class.Action.php.

GetIcon (   $name,
  $text,
  $width = "",
  $height = "" 
)

Definition at line 295 of file Class.Action.php.

+ Here is the call graph for this function:

GetImageFile (   $name)

Definition at line 238 of file Class.Action.php.

GetImageUrl (   $name,
  $detectstyle = true,
  $size = null 
)

Definition at line 224 of file Class.Action.php.

GetLayoutFile (   $layname)

Definition at line 304 of file Class.Action.php.

GetParam (   $name,
  $def = "" 
)

Definition at line 206 of file Class.Action.php.

HasPermission (   $acl_name = "",
  $app_name = "" 
)

Definition at line 332 of file Class.Action.php.

info (   $msg)

Definition at line 602 of file Class.Action.php.

Init (   $app,
  $action_desc,
  $update = FALSE 
)

Definition at line 503 of file Class.Action.php.

PreInsert ( )

Definition at line 193 of file Class.Action.php.

+ Here is the call graph for this function:

PreUpdate ( )

Definition at line 200 of file Class.Action.php.

+ Here is the call graph for this function:

Read (   $k,
  $d = "" 
)

Definition at line 156 of file Class.Action.php.

Register (   $k,
  $v 
)

Definition at line 164 of file Class.Action.php.

Set (   $name,
$parent 
)

Definition at line 102 of file Class.Action.php.

+ Here is the call graph for this function:

setParamU (   $name,
  $val 
)

set a new value for a user parameter

Parameters
string$nameparameter key
string$valnew value for the parameter
Returns
string error message if not succeeed else empty string

Definition at line 218 of file Class.Action.php.

Text (   $code,
  $args = NULL 
)

Definition at line 592 of file Class.Action.php.

Unregister (   $k)

Definition at line 171 of file Class.Action.php.

warning (   $msg)

Definition at line 606 of file Class.Action.php.

Field Documentation

$criterias
Initial value:
= array(
"name" => array(
"libelle" => "Nom",
"type" => "TXT"
)
)

Definition at line 93 of file Class.Action.php.

$dbtable = "action"

Definition at line 59 of file Class.Action.php.

$def
Initial value:
= array(
"criteria" => "",
"order_by" => "name"
)

Definition at line 88 of file Class.Action.php.

$fields
Initial value:
= array(
"id",
"id_application",
"name",
"short_name",
"long_name",
"script",
"function",
"layout",
"available",
"acl",
"grant_level",
"openaccess",
"root",
"icon",
"toc",
"father",
"toc_order"
)

Definition at line 29 of file Class.Action.php.

$grant_level = 0

Definition at line 100 of file Class.Action.php.

$id_fields
Initial value:
= array(
"id"
)

Definition at line 49 of file Class.Action.php.

$idx
Initial value:
= array(
"id",
"id_application",
"name"
)

Definition at line 53 of file Class.Action.php.

$parent

Definition at line 86 of file Class.Action.php.

$sqlcreate
Initial value:
= '
create table action (id int not null,
primary key (id),
id_application int not null,
name varchar(30) not null,
short_name text ,
long_name text,
script text,
function text,
layout text ,
available varchar(3),
acl varchar(20),
grant_level int,
openaccess char,
root char,
icon varchar(100),
toc char,
father int ,
toc_order int);
create index action_idx1 on action(id);
create index action_idx2 on action(id_application);
create index action_idx3 on action(name);
create sequence SEQ_ID_ACTION;
'

Definition at line 61 of file Class.Action.php.


The documentation for this class was generated from the following file:
← centre documentaire © anakeen - published under CC License - Dynacase