eZ\Publish\Core\Persistence\Legacy\Content\ObjectState\Gateway\DoctrineDatabase::updateObjectStatePriority PHP Method

updateObjectStatePriority() public method

Updates the object state priority to provided value.
public updateObjectStatePriority ( mixed $stateId, integer $priority )
$stateId mixed
$priority integer
    public function updateObjectStatePriority($stateId, $priority)
    {
        $query = $this->dbHandler->createUpdateQuery();
        $query->update($this->dbHandler->quoteTable('ezcobj_state'))->set($this->dbHandler->quoteColumn('priority'), $query->bindValue($priority, null, \PDO::PARAM_INT))->where($query->expr->eq($this->dbHandler->quoteColumn('id'), $query->bindValue($stateId, null, \PDO::PARAM_INT)));
        $query->prepare()->execute();
    }