-
-
Notifications
You must be signed in to change notification settings - Fork 218
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4943 from neos/publishingBonanza
Highlevel Workspace API
- Loading branch information
Showing
8 changed files
with
749 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Neos.Neos package. | ||
* | ||
* (c) Contributors of the Neos Project - www.neos.io | ||
* | ||
* This package is Open Source Software. For the full copyright and license | ||
* information, please view the LICENSE file which was distributed with this | ||
* source code. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Neos\Neos\Domain\Workspace; | ||
|
||
use Neos\ContentRepository\Core\SharedModel\ContentRepository\ContentRepositoryId; | ||
use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; | ||
use Neos\Flow\Annotations as Flow; | ||
|
||
/** | ||
* The command DTO to communicate discarding of all changes recorded in a given workspace | ||
* | ||
* @internal for communication within Neos only | ||
*/ | ||
#[Flow\Proxy(false)] | ||
final readonly class DiscardAllChanges | ||
{ | ||
public function __construct( | ||
public ContentRepositoryId $contentRepositoryId, | ||
public WorkspaceName $workspaceName, | ||
) { | ||
} | ||
|
||
/** | ||
* @param array<string,string> $values | ||
*/ | ||
public static function fromArray(array $values): self | ||
{ | ||
return new self( | ||
ContentRepositoryId::fromString($values['contentRepositoryId']), | ||
WorkspaceName::fromString($values['workspaceName']), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Neos.Neos package. | ||
* | ||
* (c) Contributors of the Neos Project - www.neos.io | ||
* | ||
* This package is Open Source Software. For the full copyright and license | ||
* information, please view the LICENSE file which was distributed with this | ||
* source code. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Neos\Neos\Domain\Workspace; | ||
|
||
use Neos\Flow\Annotations as Flow; | ||
|
||
/** | ||
* The discarding result DTO | ||
* | ||
* @internal for communication within Neos only | ||
*/ | ||
#[Flow\Proxy(false)] | ||
final readonly class DiscardingResult | ||
{ | ||
public function __construct( | ||
public int $numberOfDiscardedChanges, | ||
) { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Neos.Neos package. | ||
* | ||
* (c) Contributors of the Neos Project - www.neos.io | ||
* | ||
* This package is Open Source Software. For the full copyright and license | ||
* information, please view the LICENSE file which was distributed with this | ||
* source code. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Neos\Neos\Domain\Workspace; | ||
|
||
use Neos\ContentRepository\Core\SharedModel\ContentRepository\ContentRepositoryId; | ||
use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; | ||
use Neos\Flow\Annotations as Flow; | ||
|
||
/** | ||
* The command DTO to communicate publication of all changes recorded in a given workspace | ||
* | ||
* @internal for communication within Neos only | ||
*/ | ||
#[Flow\Proxy(false)] | ||
final readonly class PublishAllChanges | ||
{ | ||
public function __construct( | ||
public ContentRepositoryId $contentRepositoryId, | ||
public WorkspaceName $workspaceName, | ||
) { | ||
} | ||
|
||
/** | ||
* @param array<string,string> $values | ||
*/ | ||
public static function fromArray(array $values): self | ||
{ | ||
return new self( | ||
ContentRepositoryId::fromString($values['contentRepositoryId']), | ||
WorkspaceName::fromString($values['workspaceName']), | ||
); | ||
} | ||
} |
Oops, something went wrong.