Taxonomy classification provider.
More...
|
static | isActive ($a_parent_ref_id, $a_parent_obj_id, $a_parent_obj_type) |
|
static | getValidProviders ($a_parent_ref_id, $a_parent_obj_id, $a_parent_obj_type) |
| Get all valid providers (for parent container) More...
|
|
static | isActive ($a_parent_ref_id, $a_parent_obj_id, $a_parent_obj_type) |
| Is provider currently active? More...
|
|
◆ getActiveTaxonomiesForParentRefId()
static ilTaxonomyClassificationProvider::getActiveTaxonomiesForParentRefId |
( |
|
$a_parent_ref_id | ) |
|
|
staticprotected |
Definition at line 84 of file class.ilTaxonomyClassificationProvider.php.
References ilContainer\_getContainerSettings(), ilContainer\_lookupContainerSetting(), ilObject\_lookupType(), array, ilObjCategoryGUI\CONTAINER_SETTING_TAXBLOCK, ilObjTaxonomy\getUsageOfObject(), and ilObjectServiceSettingsGUI\TAXONOMIES.
88 if(!isset(self::$valid_tax_map[$a_parent_ref_id]))
90 include_once
"Services/Object/classes/class.ilObjectServiceSettingsGUI.php";
91 include_once
"Services/Taxonomy/classes/class.ilObjTaxonomy.php";
92 include_once
"Modules/Category/classes/class.ilObjCategoryGUI.php";
97 foreach($tree->getPathFull($a_parent_ref_id) as $node)
99 if($node[
"type"] ==
"cat")
101 $node_valid =
array();
109 $all_valid = array_merge($all_valid,
115 if(substr($keyword, 0, strlen($prefix)) == $prefix && (
bool)$value)
117 $active[] = substr($keyword, strlen($prefix));
121 $node_valid = array_intersect($all_valid, $active);
124 if(
sizeof($node_valid))
126 foreach($node_valid as $idx => $node_id)
131 unset($node_valid[$idx]);
136 self::$valid_tax_map[$node[
"ref_id"]] = $node_valid;
141 return sizeof(self::$valid_tax_map[$a_parent_ref_id]);
static getUsageOfObject($a_obj_id, $a_include_titles=false)
Get usage of object.
const CONTAINER_SETTING_TAXBLOCK
static _getContainerSettings($a_id)
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=NULL)
Lookup a container setting.
◆ getFilteredObjects()
ilTaxonomyClassificationProvider::getFilteredObjects |
( |
| ) |
|
Definition at line 144 of file class.ilTaxonomyClassificationProvider.php.
References array, and ilTaxNodeAssignment\findObjectsByNode().
146 include_once
"Services/Taxonomy/classes/class.ilTaxonomyTree.php";
147 include_once
"Services/Taxonomy/classes/class.ilTaxNodeAssignment.php";
148 include_once
"Services/Taxonomy/classes/class.ilTaxonomyNode.php";
150 $tax_obj_ids = $tax_map =
array();
153 foreach($this->selection as $node_id)
156 $tax_map[$node->getTaxonomyId()][] = $node_id;
159 foreach($tax_map as $tax_id => $node_ids)
164 $tax_nodes =
array();
165 foreach($node_ids as $node_id)
167 $tax_nodes = array_merge($tax_nodes, $tax_tree->getSubTreeIds($node_id));
168 $tax_nodes[] = $node_id;
176 foreach($tax_obj_ids as $tax_objs)
178 if($obj_ids === null)
180 $obj_ids = $tax_objs;
184 $obj_ids = array_intersect($obj_ids, $tax_objs);
188 return (
array)$obj_ids;
static findObjectsByNode($a_tax_id, array $a_node_ids, $a_item_type)
Find object which have assigned nodes.
Create styles array
The data for the language used.
◆ importPostData()
ilTaxonomyClassificationProvider::importPostData |
( |
|
$a_saved = null | ) |
|
Definition at line 54 of file class.ilTaxonomyClassificationProvider.php.
References array.
56 $incoming_id = (int)$_REQUEST[
"tax_node"];
59 if(is_array($a_saved))
61 foreach($a_saved as $idx => $node_id)
63 if($node_id == $incoming_id)
65 unset($a_saved[$idx]);
69 $a_saved[] = $incoming_id;
74 return array($incoming_id);
Create styles array
The data for the language used.
◆ isActive()
static ilTaxonomyClassificationProvider::isActive |
( |
|
$a_parent_ref_id, |
|
|
|
$a_parent_obj_id, |
|
|
|
$a_parent_obj_type |
|
) |
| |
|
static |
◆ render()
ilTaxonomyClassificationProvider::render |
( |
array & |
$a_html, |
|
|
|
$a_parent_gui |
|
) |
| |
Definition at line 25 of file class.ilTaxonomyClassificationProvider.php.
References ilObject\_lookupTitle(), and array.
27 include_once(
"./Services/Taxonomy/classes/class.ilTaxonomyExplorerGUI.php");
29 foreach(self::$valid_tax_map[$this->parent_ref_id] as $tax_id)
32 $tax_exp->setSkipRootNode(
true);
33 $tax_exp->setOnClick(
"il.Classification.toggle({tax_node: '{NODE_CHILD}'});");
35 if(is_array($this->selection))
37 foreach($this->selection as $node_id)
39 $tax_exp->setPathOpen($node_id);
40 $tax_exp->setNodeSelected($node_id);
44 if (!$tax_exp->handleCommand())
48 "html" => $tax_exp->getHTML()
Taxonomy explorer GUI class.
static _lookupTitle($a_id)
lookup object title
Create styles array
The data for the language used.
◆ setSelection()
ilTaxonomyClassificationProvider::setSelection |
( |
|
$a_value | ) |
|
◆ $selection
ilTaxonomyClassificationProvider::$selection |
|
protected |
◆ $valid_tax_map
ilTaxonomyClassificationProvider::$valid_tax_map = array() |
|
staticprotected |
The documentation for this class was generated from the following file: