|
@@ 450-463 (lines=14) @@
|
| 447 |
|
* |
| 448 |
|
* @param \eZ\Publish\API\Repository\Values\Content\VersionInfo $versionInfo |
| 449 |
|
*/ |
| 450 |
|
public function deleteVersion(VersionInfo $versionInfo) |
| 451 |
|
{ |
| 452 |
|
$returnValue = $this->service->deleteVersion($versionInfo); |
| 453 |
|
$this->signalDispatcher->emit( |
| 454 |
|
new DeleteVersionSignal( |
| 455 |
|
array( |
| 456 |
|
'contentId' => $versionInfo->contentInfo->id, |
| 457 |
|
'versionNo' => $versionInfo->versionNo, |
| 458 |
|
) |
| 459 |
|
) |
| 460 |
|
); |
| 461 |
|
|
| 462 |
|
return $returnValue; |
| 463 |
|
} |
| 464 |
|
|
| 465 |
|
/** |
| 466 |
|
* Loads all versions for the given content. |
|
@@ 553-567 (lines=15) @@
|
| 550 |
|
* |
| 551 |
|
* @return \eZ\Publish\API\Repository\Values\Content\Relation the newly created relation |
| 552 |
|
*/ |
| 553 |
|
public function addRelation(VersionInfo $sourceVersion, ContentInfo $destinationContent) |
| 554 |
|
{ |
| 555 |
|
$returnValue = $this->service->addRelation($sourceVersion, $destinationContent); |
| 556 |
|
$this->signalDispatcher->emit( |
| 557 |
|
new AddRelationSignal( |
| 558 |
|
array( |
| 559 |
|
'srcContentId' => $sourceVersion->contentInfo->id, |
| 560 |
|
'srcVersionNo' => $sourceVersion->versionNo, |
| 561 |
|
'dstContentId' => $destinationContent->id, |
| 562 |
|
) |
| 563 |
|
) |
| 564 |
|
); |
| 565 |
|
|
| 566 |
|
return $returnValue; |
| 567 |
|
} |
| 568 |
|
|
| 569 |
|
/** |
| 570 |
|
* Removes a relation of type COMMON from a draft. |
|
@@ 579-593 (lines=15) @@
|
| 576 |
|
* @param \eZ\Publish\API\Repository\Values\Content\VersionInfo $sourceVersion |
| 577 |
|
* @param \eZ\Publish\API\Repository\Values\Content\ContentInfo $destinationContent |
| 578 |
|
*/ |
| 579 |
|
public function deleteRelation(VersionInfo $sourceVersion, ContentInfo $destinationContent) |
| 580 |
|
{ |
| 581 |
|
$returnValue = $this->service->deleteRelation($sourceVersion, $destinationContent); |
| 582 |
|
$this->signalDispatcher->emit( |
| 583 |
|
new DeleteRelationSignal( |
| 584 |
|
array( |
| 585 |
|
'srcContentId' => $sourceVersion->contentInfo->id, |
| 586 |
|
'srcVersionNo' => $sourceVersion->versionNo, |
| 587 |
|
'dstContentId' => $destinationContent->id, |
| 588 |
|
) |
| 589 |
|
) |
| 590 |
|
); |
| 591 |
|
|
| 592 |
|
return $returnValue; |
| 593 |
|
} |
| 594 |
|
|
| 595 |
|
/** |
| 596 |
|
* Adds translation information to the content object. |