ILIAS
trunk Revision v5.2.0beta1-34132-g2d4d73d4a0
|
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...
Public Member Functions | |
__construct (ilADTDBBridge $a_properties) | |
setElementIdColumn (string $a_name, string $a_type) | |
getElementIdColumn () | |
read (bool $a_return_additional_data=false) | |
Read record. More... | |
write (array $a_additional_data=null) | |
Create/insert record. More... | |
Static Public Member Functions | |
static | deleteByPrimary (string $a_table, array $a_primary, string $a_type=null) |
static | preloadByPrimary (string $a_table, array $a_primary) |
static | cloneByPrimary (string $a_table, array $a_primary_def, array $a_source_primary, array $a_target_primary, array $a_additional=null) |
Clone values by (partial) primary key. More... | |
static | readByPrimary (string $a_table, array $a_primary, ?string $a_type=null) |
Read directly. More... | |
static | create (string $table, array $fields, string $type) |
static | writeByPrimary (string $a_table, array $a_primary, string $a_type, $a_value) |
Write directly. More... | |
static | find (string $a_table, string $a_type, int $a_field_id, string $a_condition, ?string $a_additional_fields=null) |
Find entries. More... | |
Data Fields | |
const | SINGLE_COLUMN_NAME = "value" |
Protected Member Functions | |
init () | |
getTableForElementType (string $a_type) | |
Get table name for ADT type. More... | |
mapElementsToTables () | |
Map all group elements to sub tables. More... | |
processTableRowForElement (string $a_sub_table, string $a_element_id, array $a_row) | |
findCurrentDBBridge (int $element_id) | |
Static Protected Member Functions | |
static | getTablesMap () |
static | buildPartialPrimaryWhere (array $a_primary) |
static | getTableTypeMap () |
Protected Attributes | |
ilADTDBBridge | $properties |
string | $element_column = '' |
string | $element_column_type = '' |
array | $tables_map = [] |
array | $tables_map_type = [] |
ilDBInterface | $db |
Static Protected Attributes | |
static array | $preloaded = [] |
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 ADT Active Record by type helper class This class expects a valid primary for all actions!
Definition at line 27 of file class.ilADTActiveRecordByType.php.
ilADTActiveRecordByType::__construct | ( | ilADTDBBridge | $a_properties | ) |
Definition at line 41 of file class.ilADTActiveRecordByType.php.
|
staticprotected |
Definition at line 369 of file class.ilADTActiveRecordByType.php.
|
static |
Clone values by (partial) primary key.
string | $a_table | |
array | $a_primary_def | |
array | $a_source_primary | |
array | $a_target_primary | |
array | $a_additional |
Definition at line 467 of file class.ilADTActiveRecordByType.php.
References $DIC, $ilDB, ilDBConstants\T_INTEGER, and ilDBConstants\T_TEXT.
Referenced by ilAdvancedMDValues\_cloneValues(), and ilGlossaryTerm\_copyTerm().
|
static |
Definition at line 597 of file class.ilADTActiveRecordByType.php.
References $DIC, ilDBInterface\manipulate(), and ilDBInterface\quote().
Referenced by ilAdvancedMDFieldDefinitionSelect\update().
|
static |
Definition at line 389 of file class.ilADTActiveRecordByType.php.
Referenced by ilAdvancedMDValues\_cloneValues(), ilAdvancedMDValues\_deleteByFieldId(), ilAdvancedMDValues\_deleteByObjId(), and ilAdvancedMDFieldDefinitionSelect\update().
|
static |
Find entries.
Definition at line 673 of file class.ilADTActiveRecordByType.php.
References $DIC, $ilDB, $res, and ilDBConstants\FETCHMODE_ASSOC.
Referenced by ilAdvancedMDFieldDefinitionSelect\findBySingleValue(), ilAdvancedMDFieldDefinitionInternalLink\searchObjects(), ilAdvancedMDFieldDefinitionText\searchObjects(), ilAdvancedMDFieldDefinition\searchObjects(), and ilAdvancedMDFieldDefinition\searchSubObjects().
|
protected |
Definition at line 359 of file class.ilADTActiveRecordByType.php.
Referenced by write().
ilADTActiveRecordByType::getElementIdColumn | ( | ) |
Definition at line 69 of file class.ilADTActiveRecordByType.php.
References $element_column.
Referenced by read(), and write().
|
protected |
Get table name for ADT type.
string | $a_type |
Definition at line 95 of file class.ilADTActiveRecordByType.php.
Referenced by mapElementsToTables(), and write().
|
staticprotected |
Definition at line 74 of file class.ilADTActiveRecordByType.php.
|
staticprotected |
Definition at line 446 of file class.ilADTActiveRecordByType.php.
|
protected |
Definition at line 50 of file class.ilADTActiveRecordByType.php.
Referenced by __construct().
|
protected |
Map all group elements to sub tables.
Definition at line 107 of file class.ilADTActiveRecordByType.php.
References $res, and getTableForElementType().
Referenced by read(), and write().
|
static |
Definition at line 423 of file class.ilADTActiveRecordByType.php.
Referenced by ilAdvancedMDValues\preloadByObjIds(), and ilAdvancedMDValues\queryForRecords().
|
protected |
Definition at line 119 of file class.ilADTActiveRecordByType.php.
Referenced by read().
ilADTActiveRecordByType::read | ( | bool | $a_return_additional_data = false | ) |
Read record.
bool | $a_return_additional_data |
Definition at line 160 of file class.ilADTActiveRecordByType.php.
References $data, ILIAS\LTI\ToolProvider\$key, getElementIdColumn(), mapElementsToTables(), and processTableRowForElement().
Referenced by ilAdvancedMDValues\queryForRecords().
|
static |
Read directly.
string | $a_table | |
array | $a_primary | |
string | null | $a_type |
Definition at line 554 of file class.ilADTActiveRecordByType.php.
References $DIC, $ilDB, and $res.
Referenced by ilAdvancedMDValues\findByObjectId().
ilADTActiveRecordByType::setElementIdColumn | ( | string | $a_name, |
string | $a_type | ||
) |
Definition at line 63 of file class.ilADTActiveRecordByType.php.
Referenced by ilAdvancedMDValues\queryForRecords().
ilADTActiveRecordByType::write | ( | array | $a_additional_data = null | ) |
Create/insert record.
array | $a_additional_data |
Definition at line 246 of file class.ilADTActiveRecordByType.php.
References $id, ILIAS\LTI\ToolProvider\$key, $q, findCurrentDBBridge(), getElementIdColumn(), getTableForElementType(), mapElementsToTables(), and ilDBConstants\T_INTEGER.
|
static |
Write directly.
string | $a_table | |
array | $a_primary | |
string | $a_type | |
$a_value |
Definition at line 639 of file class.ilADTActiveRecordByType.php.
|
protected |
Definition at line 39 of file class.ilADTActiveRecordByType.php.
|
protected |
Definition at line 30 of file class.ilADTActiveRecordByType.php.
Referenced by getElementIdColumn().
|
protected |
Definition at line 31 of file class.ilADTActiveRecordByType.php.
|
staticprotected |
Definition at line 35 of file class.ilADTActiveRecordByType.php.
|
protected |
Definition at line 29 of file class.ilADTActiveRecordByType.php.
|
protected |
Definition at line 32 of file class.ilADTActiveRecordByType.php.
|
protected |
Definition at line 33 of file class.ilADTActiveRecordByType.php.
const ilADTActiveRecordByType::SINGLE_COLUMN_NAME = "value" |