ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
Taxonomy node <-> item assignment. More...
Public Member Functions | |
__construct ($a_component_id, $a_obj_id, $a_item_type, $a_tax_id) | |
Constructor. More... | |
getComponentId () | |
Get component id. More... | |
getItemType () | |
Get item type. More... | |
getTaxonomyId () | |
Get taxonomy id. More... | |
setObjectId ($a_val) | |
Set object id. More... | |
getObjectId () | |
Get object id. More... | |
getAssignmentsOfNode ($a_node_id) | |
Get assignments of node. More... | |
getAssignmentsOfItem ($a_item_id) | |
Get assignments for item. More... | |
addAssignment ($a_node_id, $a_item_id, $a_order_nr=0) | |
Add assignment. More... | |
deleteAssignment ($a_node_id, $a_item_id) | |
Delete assignment. More... | |
getMaxOrderNr ($a_node_id) | |
Get maximum order number. More... | |
setOrderNr ($a_node_id, $a_item_id, $a_order_nr) | |
Set order nr. More... | |
deleteAssignmentsOfItem ($a_item_id) | |
Delete assignments of item. More... | |
deleteAssignmentsOfNode ($a_node_id) | |
Delete assignments of node. More... | |
fixOrderNr ($a_node_id) | |
Fix Order Nr. More... | |
Static Public Member Functions | |
static | deleteAllAssignmentsOfNode ($a_node_id) |
Delete assignments of node. More... | |
static | findObjectsByNode ($a_tax_id, array $a_node_ids, $a_item_type) |
Find object which have assigned nodes. More... | |
Protected Member Functions | |
setComponentId ($a_val) | |
Set component id. More... | |
setItemType ($a_val) | |
Set item type. More... | |
setTaxonomyId ($a_val) | |
Set taxonomy id. More... | |
Protected Attributes | |
$db | |
Taxonomy node <-> item assignment.
This class allows to assign items to taxonomy nodes.
/
Definition at line 17 of file class.ilTaxNodeAssignment.php.
ilTaxNodeAssignment::__construct | ( | $a_component_id, | |
$a_obj_id, | |||
$a_item_type, | |||
$a_tax_id | |||
) |
Constructor.
string | $a_component_id | component id (e.g. "glo" for Modules/Glossary) |
int | $a_obj_id | repository object id of the object that is responsible for the assignment |
string | $a_item_type | item type (e.g. "term", must be unique component wide) [use "obj" if repository object wide taxonomies!] |
int | $a_tax_id | taxonomy id |
ilTaxonomyException |
Definition at line 33 of file class.ilTaxNodeAssignment.php.
References $DIC, setComponentId(), setItemType(), setObjectId(), and setTaxonomyId().
ilTaxNodeAssignment::addAssignment | ( | $a_node_id, | |
$a_item_id, | |||
$a_order_nr = 0 |
|||
) |
Add assignment.
int | $a_node_id | node id |
int | $a_item_id | item id |
int | $a_order_nr | order nr |
ilTaxonomyException |
Definition at line 208 of file class.ilTaxNodeAssignment.php.
References $db, $ilDB, array, getComponentId(), getItemType(), getMaxOrderNr(), getObjectId(), and getTaxonomyId().
Referenced by ilObjCategory\cloneDependencies(), and ilTaxonomyDataSet\importRecord().
|
static |
Delete assignments of node.
int | $a_node_id | node id |
Definition at line 387 of file class.ilTaxNodeAssignment.php.
Referenced by ilTaxonomyNode\delete().
ilTaxNodeAssignment::deleteAssignment | ( | $a_node_id, | |
$a_item_id | |||
) |
Delete assignment.
int | $a_node_id | node id |
int | $a_item_id | item id |
ilTaxonomyException |
Definition at line 269 of file class.ilTaxNodeAssignment.php.
References $db, $ilDB, and getTaxonomyId().
ilTaxNodeAssignment::deleteAssignmentsOfItem | ( | $a_item_id | ) |
Delete assignments of item.
int | $a_item_id | item id |
Definition at line 350 of file class.ilTaxNodeAssignment.php.
References $db, $ilDB, and getTaxonomyId().
Referenced by ilGlossaryTermGUI\updateTerm().
ilTaxNodeAssignment::deleteAssignmentsOfNode | ( | $a_node_id | ) |
Delete assignments of node.
int | $a_node_id | node id |
Definition at line 369 of file class.ilTaxNodeAssignment.php.
References $db, $ilDB, getComponentId(), getItemType(), and getObjectId().
|
static |
Find object which have assigned nodes.
int | $a_item_type | |
int | $a_tax_id | |
array | $a_node_ids |
Definition at line 441 of file class.ilTaxNodeAssignment.php.
References $DIC, $ilDB, $res, $row, and array.
Referenced by ilTaxonomyClassificationProvider\getFilteredObjects().
ilTaxNodeAssignment::fixOrderNr | ( | $a_node_id | ) |
Fix Order Nr.
Definition at line 402 of file class.ilTaxNodeAssignment.php.
References $db, $ilDB, getComponentId(), getItemType(), getObjectId(), and getTaxonomyId().
|
final |
Get assignments for item.
int | $a_item_id | item id |
Definition at line 181 of file class.ilTaxNodeAssignment.php.
References $db, $ilDB, array, getObjectId(), and getTaxonomyId().
Referenced by ilObjGlossary\cloneObject(), ilTestRandomQuestionSetPoolDeriver\filterForQuestionRelatedTaxonomies(), ilGlossaryTermGUI\getEditTermForm(), and assQuestionGUI\populateTaxonomyFormSection().
|
final |
Get assignments of node.
int | $a_node_id | node id |
Definition at line 142 of file class.ilTaxNodeAssignment.php.
References $db, $ilDB, array, getComponentId(), getItemType(), getObjectId(), and getTaxonomyId().
ilTaxNodeAssignment::getComponentId | ( | ) |
Get component id.
Definition at line 71 of file class.ilTaxNodeAssignment.php.
Referenced by addAssignment(), deleteAssignmentsOfNode(), fixOrderNr(), getAssignmentsOfNode(), and setOrderNr().
ilTaxNodeAssignment::getItemType | ( | ) |
Get item type.
Definition at line 91 of file class.ilTaxNodeAssignment.php.
Referenced by addAssignment(), deleteAssignmentsOfNode(), fixOrderNr(), getAssignmentsOfNode(), and setOrderNr().
ilTaxNodeAssignment::getMaxOrderNr | ( | $a_node_id | ) |
Get maximum order number.
Definition at line 305 of file class.ilTaxNodeAssignment.php.
References $db, $ilDB, and getTaxonomyId().
Referenced by addAssignment().
ilTaxNodeAssignment::getObjectId | ( | ) |
Get object id.
Definition at line 131 of file class.ilTaxNodeAssignment.php.
Referenced by addAssignment(), deleteAssignmentsOfNode(), fixOrderNr(), getAssignmentsOfItem(), getAssignmentsOfNode(), and setOrderNr().
ilTaxNodeAssignment::getTaxonomyId | ( | ) |
Get taxonomy id.
Definition at line 111 of file class.ilTaxNodeAssignment.php.
Referenced by addAssignment(), deleteAssignment(), deleteAssignmentsOfItem(), fixOrderNr(), getAssignmentsOfItem(), getAssignmentsOfNode(), getMaxOrderNr(), and setOrderNr().
|
protected |
Set component id.
string | $a_val | component id |
Definition at line 61 of file class.ilTaxNodeAssignment.php.
Referenced by __construct().
|
protected |
Set item type.
string | $a_val | item type |
Definition at line 81 of file class.ilTaxNodeAssignment.php.
Referenced by __construct().
ilTaxNodeAssignment::setObjectId | ( | $a_val | ) |
Set object id.
int | $a_val | object id |
Definition at line 121 of file class.ilTaxNodeAssignment.php.
Referenced by __construct().
ilTaxNodeAssignment::setOrderNr | ( | $a_node_id, | |
$a_item_id, | |||
$a_order_nr | |||
) |
Set order nr.
Definition at line 328 of file class.ilTaxNodeAssignment.php.
References $db, $ilDB, getComponentId(), getItemType(), getObjectId(), and getTaxonomyId().
|
protected |
Set taxonomy id.
int | $a_val | taxonomy id |
Definition at line 101 of file class.ilTaxNodeAssignment.php.
Referenced by __construct().
|
protected |
Definition at line 22 of file class.ilTaxNodeAssignment.php.
Referenced by addAssignment(), deleteAssignment(), deleteAssignmentsOfItem(), deleteAssignmentsOfNode(), fixOrderNr(), getAssignmentsOfItem(), getAssignmentsOfNode(), getMaxOrderNr(), and setOrderNr().