public function HierarchyOutlineStorage::update in Entity Reference Hierarchy 8
Updates hierarchy reference for links that were moved between hierarchies.
Parameters
int $nid: The nid of the hierarchy entry to be updated.
array $fields: The array of fields to be updated.
Return value
mixed The number of rows matched by the update query.
Overrides HierarchyOutlineStorageInterface::update
File
- src/
HierarchyOutlineStorage.php, line 211 - Definition of Drupal\entity_hierarchy\HierarchyOutlineStorage.
Class
- HierarchyOutlineStorage
- Defines a storage class for hierarchies outline.
Namespace
Drupal\entity_hierarchyCode
public function update($hid, $fields) {
return $this->connection
->update('entity_hierarchy')
->fields($fields)
->condition('hid', $hid)
->execute();
}