/**
  * Updates an existing tag.
  *
  * @throws \RuntimeException
  *
  * @param \Netgen\TagsBundle\SPI\Persistence\Tags\UpdateStruct $updateStruct
  * @param mixed $tagId
  */
 public function update(UpdateStruct $updateStruct, $tagId)
 {
     try {
         $this->innerGateway->update($updateStruct, $tagId);
     } catch (DBALException $e) {
         throw new RuntimeException('Database error', 0, $e);
     } catch (PDOException $e) {
         throw new RuntimeException('Database error', 0, $e);
     }
 }
Exemple #2
0
 /**
  * Updates tag identified by $tagId.
  *
  * @throws \eZ\Publish\API\Repository\Exceptions\NotFoundException If the specified tag is not found
  *
  * @param \Netgen\TagsBundle\SPI\Persistence\Tags\UpdateStruct $updateStruct
  * @param mixed $tagId
  *
  * @return \Netgen\TagsBundle\SPI\Persistence\Tags\Tag The updated tag
  */
 public function update(UpdateStruct $updateStruct, $tagId)
 {
     $this->gateway->update($updateStruct, $tagId);
     $this->updateSubtreeModificationTime($tagId);
     return $this->load($tagId);
 }