ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilAccessKey Class Reference

Access key handling. More...

+ Collaboration diagram for ilAccessKey:

Static Public Member Functions

static getFunctionName ($a_func_id)
 Get Function Name.
static getComponentNames ($a_func_id)
 Get Component Names.
static getKeys ($lang_key="0", $a_ignore_default=false)
 Get access keys for language.
static getKey ($a_func_id, $lang_key="0", $a_ignore_default=false)
 Get single access key.
static writeKeys ($a_keys, $a_lang_key="0")
 Write keys.

Data Fields

const NEXT = 1
const PREVIOUS = 2
const DELETE = 3
const LAST_VISITED = 4
const TREE_ON = 5
const TREE_OFF = 6
const REPLY = 7
const FORWARD_MAIL = 8
const MARK_ALL_READ = 9

Static Public Attributes

static $func_def

Static Private Member Functions

static getAllKeysEmpty ()
 Get all function ids with empty keys.

Detailed Description

Access key handling.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 11 of file class.ilAccessKey.php.

Member Function Documentation

static ilAccessKey::getAllKeysEmpty ( )
staticprivate

Get all function ids with empty keys.

Returns
array function id => empty string

Definition at line 59 of file class.ilAccessKey.php.

References $f.

Referenced by getKeys().

{
$empty_keys = array();
foreach (self::$func_def as $f => $c)
{
$empty_keys[$f] = "";
}
return $empty_keys;
}

+ Here is the caller graph for this function:

static ilAccessKey::getComponentNames (   $a_func_id)
static

Get Component Names.

Definition at line 83 of file class.ilAccessKey.php.

References $lng.

Referenced by ilAccessKeyTableGUI\fillRow().

{
global $lng;
$c_str = $lim = "";
foreach (self::$func_def[$a_func_id]["component"] as $c)
{
$c_str.= $lim.$lng->txt("acc_comp_".$c);
$lim = ", ";
}
return $c_str;
}

+ Here is the caller graph for this function:

static ilAccessKey::getFunctionName (   $a_func_id)
static

Get Function Name.

Definition at line 73 of file class.ilAccessKey.php.

References $lng.

Referenced by ilAccessKeyTableGUI\fillRow().

{
global $lng;
return $lng->txt(self::$func_def[$a_func_id]["lang"]);
}

+ Here is the caller graph for this function:

static ilAccessKey::getKey (   $a_func_id,
  $lang_key = "0",
  $a_ignore_default = false 
)
static

Get single access key.

Parameters
stringlang key, "0" means default values

Definition at line 131 of file class.ilAccessKey.php.

References $ilDB, and $key.

Referenced by ilAccessKeyGUI\getAttribute().

{
global $ilDB;
// get defaults
if ($lang_key != "0" && !$a_ignore_default)
{
$key = ilAccessKey::getKey($a_func_id);
}
// get keys of selected language
$set = $ilDB->query("SELECT * FROM acc_access_key ".
" WHERE lang_key = ".$ilDB->quote($lang_key, "text").
" AND function_id = ".$ilDB->quote($a_func_id, "integer")
);
if ($rec = $ilDB->fetchAssoc($set))
{
$key = $rec["access_key"];
}
return $key;
}

+ Here is the caller graph for this function:

static ilAccessKey::getKeys (   $lang_key = "0",
  $a_ignore_default = false 
)
static

Get access keys for language.

Parameters
stringlang key, "0" means default values

Definition at line 102 of file class.ilAccessKey.php.

References $ilDB, and getAllKeysEmpty().

Referenced by ilAccessKeyTableGUI\__construct().

{
global $ilDB;
// get defaults
if ($lang_key != "0" && !$a_ignore_default)
{
}
// get keys of selected language
$set = $ilDB->query("SELECT * FROM acc_access_key ".
" WHERE lang_key = ".$ilDB->quote($lang_key, "text")
);
while ($rec = $ilDB->fetchAssoc($set))
{
$keys[$rec["function_id"]] = $rec["access_key"];
}
return $keys;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilAccessKey::writeKeys (   $a_keys,
  $a_lang_key = "0" 
)
static

Write keys.

Parameters
arrayfunction ids => keys

Definition at line 159 of file class.ilAccessKey.php.

References $ilDB.

Referenced by ilObjAccessibilitySettingsGUI\saveAccessKeys().

{
global $ilDB;
$ilDB->manipulate("DELETE FROM acc_access_key WHERE ".
"lang_key = ".$ilDB->quote($a_lang_key, "text")
);
foreach ($a_keys as $func_id => $acc_key)
{
$ilDB->manipulate("INSERT INTO acc_access_key ".
"(lang_key, function_id, access_key) VALUES (".
$ilDB->quote($a_lang_key, "text").",".
$ilDB->quote($func_id, "integer").",".
$ilDB->quote(strtolower(trim($acc_key)), "text").
")");
}
}

+ Here is the caller graph for this function:

Field Documentation

ilAccessKey::$func_def
static
Initial value:
array(
"component" => array("global"),
"lang" => "acc_next"),
"component" => array("global"),
"lang" => "acc_previous"),
"component" => array("global"),
"lang" => "acc_delete"),
"component" => array("global"),
"lang" => "acc_last_visited"),
"component" => array("global"),
"lang" => "acc_tree_on"),
"component" => array("global"),
"lang" => "acc_tree_off"),
"component" => array("mail"),
"lang" => "acc_reply"),
"component" => array("mail"),
"lang" => "acc_forward_mail"),
"component" => array("frm"),
"lang" => "acc_mark_all_read")
)

Definition at line 24 of file class.ilAccessKey.php.

const ilAccessKey::DELETE = 3

Definition at line 16 of file class.ilAccessKey.php.

Referenced by ilMailFolderGUI\showMail().

const ilAccessKey::FORWARD_MAIL = 8

Definition at line 21 of file class.ilAccessKey.php.

Referenced by ilMailFolderGUI\showMail().

const ilAccessKey::LAST_VISITED = 4

Definition at line 17 of file class.ilAccessKey.php.

Referenced by ilNavigationHistoryGUI\getHTML().

const ilAccessKey::MARK_ALL_READ = 9
const ilAccessKey::NEXT = 1

Definition at line 14 of file class.ilAccessKey.php.

Referenced by ilLMPresentationGUI\ilLMNavigation().

const ilAccessKey::PREVIOUS = 2

Definition at line 15 of file class.ilAccessKey.php.

Referenced by ilLMPresentationGUI\ilLMNavigation().

const ilAccessKey::REPLY = 7

Definition at line 20 of file class.ilAccessKey.php.

Referenced by ilMailFolderGUI\showMail().

const ilAccessKey::TREE_OFF = 6

Definition at line 19 of file class.ilAccessKey.php.

Referenced by ilTemplate\fillSideIcons().

const ilAccessKey::TREE_ON = 5

Definition at line 18 of file class.ilAccessKey.php.

Referenced by ilTemplate\fillSideIcons().


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