eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\DoctrineDatabase::updatePathIdentificationString PHP Method

updatePathIdentificationString() public method

Updates path identification string for given $locationId.
public updatePathIdentificationString ( mixed $locationId, mixed $parentLocationId, string $text )
$locationId mixed
$parentLocationId mixed
$text string
    public function updatePathIdentificationString($locationId, $parentLocationId, $text)
    {
        $parentData = $this->getBasicNodeData($parentLocationId);
        $newPathIdentificationString = empty($parentData['path_identification_string']) ? $text : $parentData['path_identification_string'] . '/' . $text;
        /** @var $query \eZ\Publish\Core\Persistence\Database\UpdateQuery */
        $query = $this->handler->createUpdateQuery();
        $query->update('ezcontentobject_tree')->set($this->handler->quoteColumn('path_identification_string'), $query->bindValue($newPathIdentificationString, null, \PDO::PARAM_STR))->where($query->expr->eq($this->handler->quoteColumn('node_id'), $query->bindValue($locationId, null, \PDO::PARAM_INT)));
        $query->prepare()->execute();
    }