updateSubtreeModificationTime() abstract public method

Updated subtree modification time for all nodes on path.
abstract public updateSubtreeModificationTime ( string $pathString, integer | null $timestamp = null )
$pathString string
$timestamp integer | null
 /**
  * Updated subtree modification time for all nodes on path
  *
  * @param string $pathString
  * @param int|null $timestamp
  *
  * @return void
  */
 public function updateSubtreeModificationTime($pathString, $timestamp = null)
 {
     try {
         return $this->innerGateway->updateSubtreeModificationTime($pathString, $timestamp);
     } catch (DBALException $e) {
         throw new RuntimeException('Database error', 0, $e);
     } catch (PDOException $e) {
         throw new RuntimeException('Database error', 0, $e);
     }
 }
Example #2
0
 /**
  * Marks the given nodes and all ancestors as modified
  *
  * Optionally a time stamp with the modification date may be specified,
  * otherwise the current time is used.
  *
  * @param int|string $locationId
  * @param int $timestamp
  *
  * @return void
  */
 public function markSubtreeModified($locationId, $timestamp = null)
 {
     $nodeData = $this->locationGateway->getBasicNodeData($locationId);
     $timestamp = $timestamp ?: time();
     $this->locationGateway->updateSubtreeModificationTime($nodeData['path_string'], $timestamp);
 }