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

swap() abstract public method

Make the location identified by $locationId1 refer to the Content referred to by $locationId2 and vice versa.
abstract public swap ( mixed $locationId1, mixed $locationId2 ) : boolean
$locationId1 mixed
$locationId2 mixed
return boolean
    public abstract function swap($locationId1, $locationId2);

Usage Example

Ejemplo n.º 1
0
 /**
  * Swaps the content object being pointed to by a location object.
  *
  * Make the location identified by $locationId1 refer to the Content
  * referred to by $locationId2 and vice versa.
  *
  * @param mixed $locationId1
  * @param mixed $locationId2
  *
  * @return boolean
  */
 public function swap($locationId1, $locationId2)
 {
     try {
         return $this->innerGateway->swap($locationId1, $locationId2);
     } catch (DBALException $e) {
         throw new RuntimeException('Database error', 0, $e);
     } catch (PDOException $e) {
         throw new RuntimeException('Database error', 0, $e);
     }
 }
All Usage Examples Of eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway::swap