CodeIgniter
[ class tree: CodeIgniter ] [ index: CodeIgniter ] [ all elements ]

Class: Action_lib

Source Location: /libraries/Action_lib.php

Class Overview


Action Class


Author(s):

Copyright:

  • Zdenek Kalina

Variables

Methods



Class Details

[line 15]
Action Class

Checks if current action is allowed for user. Add actions in session history. Obtaion action titles from database.




Tags:

author:  Zdenek Kalina <kalinz1@fel.cvut.cz>
copyright:  Zdenek Kalina


[ Top ]


Class Variables

$action =

[line 17]


Type:   mixed


[ Top ]

$actions = array()

[line 34]


Type:   mixed


[ Top ]

$action_data =  false

[line 23]


Type:   mixed


[ Top ]

$add_to_history =  false

[line 31]


Type:   mixed


[ Top ]

$admin_action =  false

[line 30]


Type:   mixed


[ Top ]

$allowed_ugroups = array()

[line 24]


Type:   mixed


[ Top ]

$allowed_uroles = array()

[line 25]


Type:   mixed


[ Top ]

$app =

[line 16]


Type:   mixed


[ Top ]

$dynamic_title =  ''

[line 27]


Type:   mixed


[ Top ]

$history_back = array()

[line 32]


Type:   mixed


[ Top ]

$is_dynamic =  false

[line 22]


Type:   mixed


[ Top ]

$is_global_restricted =  false

[line 21]


Type:   mixed


[ Top ]

$is_restricted =  false

[line 19]


Type:   mixed


[ Top ]

$is_restricted_urole =  false

[line 20]


Type:   mixed


[ Top ]

$params = array()

[line 18]


Type:   mixed


[ Top ]

$parent_actions = array()

[line 26]


Type:   mixed


[ Top ]

$title_method =  ''

[line 28]


Type:   mixed


[ Top ]

$urole_method =  ''

[line 29]


Type:   mixed


[ Top ]



Class Methods


constructor Action_lib [line 39]

Action_lib Action_lib( )

Constructor



[ Top ]

method add_to_history [line 469]

void add_to_history( )

Add current action in session history

Action url and title is saved Save only actions in administration Action could by disabled for using in history in database




Tags:

access:  public


[ Top ]

method check [line 220]

boolean check( [boolean $show_response = true], [array $data = array()])

Test action for current user



Tags:

access:  public


Parameters:

boolean   $show_response   true when login form has to be shown if not allowed
array   $data   action data

[ Top ]

method checkLink [line 205]

boolean checkLink( string $action, [array $params = array()])

Used for checking additional action for its restrictions First loads it and then test



Tags:

access:  public


Parameters:

string   $action  
array   $params  

[ Top ]

method checkUgroup [line 363]

boolean checkUgroup( integer $user_ugroup, array $allowed_ugroups)

Compare user group and allowed user groups for action and returns if user is allowed



Tags:

access:  public


Parameters:

integer   $user_ugroup  
array   $allowed_ugroups  

[ Top ]

method checkUroles [line 378]

boolean checkUroles( array $user_uroles, array $allowed_uroles)

Compare user roles and allowed user roles for action and returns if user is allowed



Tags:

access:  public


Parameters:

array   $user_uroles  
array   $allowed_uroles  

[ Top ]

method clear [line 76]

void clear( [string $action = false])

Remove action data



Tags:

access:  public


Parameters:

string   $action  

[ Top ]

method getActionsSelect [line 416]

array getActionsSelect( [array $not_used_actions = array()], [boolean $mandatory = false])

Get all actions for using it in dropdown form field



Tags:

access:  public


Parameters:

array   $not_used_actions   actions not used in select
boolean   $mandatory   false if free select item is included

[ Top ]

method getAllowedUgroups [line 315]

array getAllowedUgroups( integer $id_action)

Get allowed user groups for action from db



Tags:

return:  allowed user groups
access:  public


Parameters:

integer   $id_action  

[ Top ]

method getAllowedUroles [line 330]

array getAllowedUroles( string $urole_method, array $params)

Get allowed user roles for action



Tags:

return:  allowed user roles
access:  public


Parameters:

string   $urole_method  
array   $params  

[ Top ]

method getDynamicTitle [line 346]

string getDynamicTitle( string $title_method, array $params)

Get dynamic title if action is set as dynamic



Tags:

access:  public


Parameters:

string   $title_method  
array   $params  

[ Top ]

method getMethodsSelect [line 435]

array getMethodsSelect( [string $type = ''], [boolean $mandatory = false])

Get all urole or title method for dropdown select from action_title_model



Tags:

access:  public


Parameters:

string   $type   if urole or title method wanted
boolean   $mandatory   false if free select item is included

[ Top ]

method getParentActions [line 393]

array getParentActions( integer $id_parent)

Get all parent actions recursive till the action root



Tags:

access:  public


Parameters:

integer   $id_parent   parent action id

[ Top ]

method initialize [line 109]

void initialize( [string $action = false], [array $params = array()])

Check action restriction and other info from db



Tags:

access:  public


Parameters:

string   $action  
array   $params  

[ Top ]

method load [line 65]

void load( string $action, [array $params = array()])

Add new action to additional array of actions



Tags:

access:  public


Parameters:

string   $action  
array   $params  

[ Top ]

method show [line 274]

void show( string $type, [string $message = ''], [boolean $custom_message = false], [boolean $render = true])

Shows Login form or info that user is not alowed Login form differs if user is in admin or public site



Tags:

access:  public


Parameters:

string   $type   loginform or not authorization echo
string   $message   additional message can be shown above login form
boolean   $custom_message   if you want use only your message
boolean   $render   write it to page at the end

[ Top ]


Documentation generated on Sun, 11 Jan 2009 04:21:03 +0100 by phpDocumentor 1.4.1