eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Handler::removeSubtree PHP Метод

removeSubtree() защищенный Метод

$original parameter is used to limit removal of moved Location aliases to history entries only.
protected removeSubtree ( mixed $id, string $action, mixed $original )
$id mixed
$action string
$original mixed
    protected function removeSubtree($id, $action, $original)
    {
        // Remove first to avoid unnecessary recursion.
        if ($original) {
            // If entry is original remove all for action (history and custom entries included).
            $this->gateway->remove($action);
        } else {
            // Else entry is history, so remove only for action with the id.
            // This means $id grouped history entries are removed, other history, active autogenerated
            // and custom are left alone.
            $this->gateway->remove($action, $id);
        }
        // Load all autogenerated for parent $id, including history.
        $entries = $this->gateway->loadAutogeneratedEntries($id, true);
        foreach ($entries as $entry) {
            $this->removeSubtree($entry['id'], $entry['action'], $entry['is_original']);
        }
    }