public function HierarchyManager::updateHierarchy in Entity Reference Hierarchy 8
Updates an existing hierarchy record in the database using the HierarchyOutlineStorage class.
Parameters
object $item: The hierarchy object to be updated in the database.
Return value
mixed Todo: figure out what's being returned
Overrides HierarchyManagerInterface::updateHierarchy
See also
HierarchyOutlineStorage::update
hierarchyRecordSave
NodehierarchyChildrenForm::save
1 call to HierarchyManager::updateHierarchy()
- HierarchyManager::hierarchyRecordSave in src/
HierarchyManager.php - Prepare an individual item to be added/removed to the database.
File
- src/
HierarchyManager.php, line 690 - Contains \Drupal\entity_hierarchy\HierarchyManager.
Class
- HierarchyManager
- Defines a hierarchy manager.
Namespace
Drupal\entity_hierarchyCode
public function updateHierarchy($item) {
unset($item->remove);
// Here we typecast the $item object to an array, and PHP is smart enough to convert it.
return $this->hierarchyOutlineStorage
->update($item->hid, (array) $item);
}