This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
More...
|
| checkPermission (int $a_user_id, int $a_context_type, int $a_context_id, int $a_action_id, int $a_action_sub_id) |
| Check permission. More...
|
|
| getMessage () |
|
| __construct (\ilDBInterface $db, \ilComponentRepositoryWrite $component_repository, string $id) |
|
| getPluginName () |
|
| getId () |
|
| getVersion () |
| Only very little classes seem to care about this: More...
|
|
| getDirectory () |
| Only very little classes seem to care about this: More...
|
|
| isActive () |
| Only very little classes seem to care about this: More...
|
|
| needsUpdate () |
|
| install () |
|
| uninstall () |
|
| activate () |
| This will update (if required) and activate the plugin. More...
|
|
| deactivate () |
|
| update () |
|
| loadLanguageModule () |
| Load language module for plugin. More...
|
|
| txt (string $a_var) |
| Get Language Variable (prefix will be prepended automatically) More...
|
|
| getTemplate (string $a_template, bool $a_par1=true, bool $a_par2=true) |
| ILIAS is moving towards UI components and plugins are expected to use these components. More...
|
|
| getStyleSheetLocation (string $a_css_file) |
| ILIAS is moving towards UI components and plugins are expected to use these components. More...
|
|
| addBlockFile ($a_tpl, $a_var, $a_block, $a_tplname) |
| ILIAS is moving towards UI components and plugins are expected to use these components. More...
|
|
| getGlobalScreenProviderCollection () |
|
| exchangeUIRendererAfterInitialization (\ILIAS\DI\Container $dic) |
| This methods allows to replace the UI Renderer (see src/UI) of ILIAS after initialization by returning a closure returning a custom renderer. More...
|
|
| exchangeUIFactoryAfterInitialization (string $dic_key, \ILIAS\DI\Container $dic) |
| This methods allows to replace some factory for UI Components (see src/UI) of ILIAS after initialization by returning a closure returning a custom factory. More...
|
|
|
static | hasDBField (string $a_field_id) |
| Check if field has db entry. More...
|
|
static | createDBField (int $a_type, string $a_title, array $a_access=null, array $a_options=null) |
| Create field db entry. More...
|
|
static | updateDBField (int $a_field_id, string $a_title, array $a_access=null, array $a_options=null) |
| Update field db entry. More...
|
|
static | deleteDBField (int $a_field_id) |
| Delete field db entry. More...
|
|
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.
If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Abstract parent class for all udf claiming plugin classes.
- Author
- Jörg Lützenkirchen luetz.nosp@m.enki.nosp@m.rchen.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Definition at line 23 of file class.ilUDFClaimingPlugin.php.
◆ checkPermission()
ilUDFClaimingPlugin::checkPermission |
( |
int |
$a_user_id, |
|
|
int |
$a_context_type, |
|
|
int |
$a_context_id, |
|
|
int |
$a_action_id, |
|
|
int |
$a_action_sub_id |
|
) |
| |
|
abstract |
◆ createDBField()
static ilUDFClaimingPlugin::createDBField |
( |
int |
$a_type, |
|
|
string |
$a_title, |
|
|
array |
$a_access = null , |
|
|
array |
$a_options = null |
|
) |
| |
|
static |
Create field db entry.
Definition at line 107 of file class.ilUDFClaimingPlugin.php.
References $DIC, $ilDB, and UDF_TYPE_SELECT.
115 $ilDB = $DIC[
'ilDB'];
117 $field_id =
$ilDB->nextId(
"udf_definition");
120 if (!self::isValidFieldType($a_type)) {
131 "field_id" => array(
"integer", $field_id),
132 "field_type" => array(
"integer", $a_type),
133 "field_name" => array(
"text", trim($a_title)),
134 "field_values" => array(
"text", serialize((array) $a_options))
137 self::handleAccesss($fields, $a_access);
139 $ilDB->insert(
"udf_definition", $fields);
◆ deleteDBField()
static ilUDFClaimingPlugin::deleteDBField |
( |
int |
$a_field_id | ) |
|
|
static |
Delete field db entry.
Definition at line 185 of file class.ilUDFClaimingPlugin.php.
References $DIC, and $ilDB.
189 $ilDB = $DIC[
'ilDB'];
191 if (self::hasDBField($a_field_id)) {
194 $ilDB->manipulate(
"DELETE FROM udf_definition" .
195 " WHERE field_id = " .
$ilDB->quote($a_field_id,
"integer"));
◆ getDBField()
static ilUDFClaimingPlugin::getDBField |
( |
string |
$a_field_id | ) |
|
|
staticprotected |
◆ handleAccesss()
static ilUDFClaimingPlugin::handleAccesss |
( |
array & |
$fields, |
|
|
?array |
$a_access = null , |
|
|
?array |
$a_existing = null |
|
) |
| |
|
staticprotected |
Convert access array to DB columns.
Definition at line 85 of file class.ilUDFClaimingPlugin.php.
90 $map = array(
"visible",
"changeable",
"searchable",
"required",
"export",
91 "course_export",
"group_export",
"registration_visible",
"visible_lua",
92 "changeable_lua",
"certificate");
93 foreach ($map as $prop) {
94 if (isset($a_access[$prop])) {
95 $fields[$prop] = array(
"integer", (
int) $a_access[$prop]);
96 } elseif (isset($a_existing[$prop])) {
97 $fields[$prop] = array(
"integer", (
int) $a_existing[$prop]);
99 $fields[$prop] = array(
"integer", 0);
◆ hasDBField()
static ilUDFClaimingPlugin::hasDBField |
( |
string |
$a_field_id | ) |
|
|
static |
Check if field has db entry.
Definition at line 48 of file class.ilUDFClaimingPlugin.php.
References $DIC, and $ilDB.
54 $set =
$ilDB->query(
"SELECT field_id FROM udf_definition" .
55 " WHERE field_id = " .
$ilDB->quote($a_field_id,
"integer"));
56 return (
bool)
$ilDB->numRows($set);
◆ isValidFieldType()
static ilUDFClaimingPlugin::isValidFieldType |
( |
int |
$a_field_type | ) |
|
|
staticprotected |
◆ updateDBField()
static ilUDFClaimingPlugin::updateDBField |
( |
int |
$a_field_id, |
|
|
string |
$a_title, |
|
|
array |
$a_access = null , |
|
|
array |
$a_options = null |
|
) |
| |
|
static |
Update field db entry.
Definition at line 147 of file class.ilUDFClaimingPlugin.php.
References $DIC, $ilDB, and UDF_TYPE_SELECT.
155 $ilDB = $DIC[
'ilDB'];
157 if (self::hasDBField($a_field_id)) {
158 $old = self::getDBField($a_field_id);
165 "field_name" => array(
"text", trim($a_title)),
166 "field_values" => array(
"text", serialize((array) $a_options))
169 self::handleAccesss($fields, $a_access, $old);
174 array(
"field_id" => array(
"integer", $a_field_id))
The documentation for this class was generated from the following file: