loadAutogeneratedEntry() abstract public method

Loads autogenerated entry id by given $action and optionally $parentId.
abstract public loadAutogeneratedEntry ( string $action, mixed | null $parentId = null ) : array
$action string
$parentId mixed | null
return array
 /**
  * Loads autogenerated entry id by given $action and optionally $parentId.
  *
  * @param string $action
  * @param mixed|null $parentId
  *
  * @return array
  */
 public function loadAutogeneratedEntry($action, $parentId = null)
 {
     try {
         return $this->innerGateway->loadAutogeneratedEntry($action, $parentId);
     } catch (DBALException $e) {
         throw new \RuntimeException('Database error', 0, $e);
     } catch (PDOException $e) {
         throw new \RuntimeException('Database error', 0, $e);
     }
 }
Ejemplo n.º 2
0
 /**
  * Notifies the underlying engine that a location was deleted or moved to trash.
  *
  * @param mixed $locationId
  */
 public function locationDeleted($locationId)
 {
     $action = 'eznode:' . $locationId;
     $entry = $this->gateway->loadAutogeneratedEntry($action);
     $this->removeSubtree($entry['id'], $action, $entry['is_original']);
 }
Ejemplo n.º 3
0
 /**
  * Notifies the underlying engine that a location was deleted or moved to trash
  *
  * @param mixed $locationId
  */
 public function locationDeleted($locationId)
 {
     $action = "eznode:" . $locationId;
     $entry = $this->gateway->loadAutogeneratedEntry($action);
     $this->removeSubtree($entry["id"], $action, $entry["is_original"]);
 }