eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\ExceptionConversion::changeMainLocation PHP Method

changeMainLocation() public method

Updates ezcontentobject_tree table for the given $contentId and eznode_assignment table for the given $contentId, $parentLocationId and $versionNo
public changeMainLocation ( mixed $contentId, mixed $locationId, mixed $versionNo, mixed $parentLocationId )
$contentId mixed
$locationId mixed
$versionNo mixed version number, needed to update eznode_assignment table
$parentLocationId mixed parent location of location identified by $locationId, needed to update eznode_assignment table
    public function changeMainLocation($contentId, $locationId, $versionNo, $parentLocationId)
    {
        try {
            return $this->innerGateway->changeMainLocation($contentId, $locationId, $versionNo, $parentLocationId);
        } catch (DBALException $e) {
            throw new RuntimeException('Database error', 0, $e);
        } catch (PDOException $e) {
            throw new RuntimeException('Database error', 0, $e);
        }
    }