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

updateNodeAssignment() public method

Update node assignment table.
public updateNodeAssignment ( integer $contentObjectId, integer $oldParent, integer $newParent, integer $opcode )
$contentObjectId integer
$oldParent integer
$newParent integer
$opcode integer
    public function updateNodeAssignment($contentObjectId, $oldParent, $newParent, $opcode)
    {
        $query = $this->handler->createUpdateQuery();
        $query->update($this->handler->quoteTable('eznode_assignment'))->set($this->handler->quoteColumn('parent_node'), $query->bindValue($newParent, null, \PDO::PARAM_INT))->set($this->handler->quoteColumn('op_code'), $query->bindValue($opcode, null, \PDO::PARAM_INT))->where($query->expr->lAnd($query->expr->eq($this->handler->quoteColumn('contentobject_id'), $query->bindValue($contentObjectId, null, \PDO::PARAM_INT)), $query->expr->eq($this->handler->quoteColumn('parent_node'), $query->bindValue($oldParent, null, \PDO::PARAM_INT))));
        $query->prepare()->execute();
    }