eZ\Publish\Core\Persistence\Legacy\Content\ObjectState\Gateway::insertObjectState PHP Метод

insertObjectState() абстрактный публичный Метод

Inserts a new object state into database.
abstract public insertObjectState ( eZ\Publish\SPI\Persistence\Content\ObjectState $objectState, integer $groupId )
$objectState eZ\Publish\SPI\Persistence\Content\ObjectState
$groupId integer
    public abstract function insertObjectState(ObjectState $objectState, $groupId);

Usage Example

 /**
  * Inserts a new object state into database.
  *
  * @param \eZ\Publish\SPI\Persistence\Content\ObjectState $objectState
  * @param int $groupId
  */
 public function insertObjectState(ObjectState $objectState, $groupId)
 {
     try {
         return $this->innerGateway->insertObjectState($objectState, $groupId);
     } 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\ObjectState\Gateway::insertObjectState