protected function LingotekContentModerationTest::addReviewStateToEditorialWorkflow in Lingotek Translation 3.6.x
Same name and namespace in other branches
- 8.2 tests/src/Functional/LingotekContentModerationTest.php \Drupal\Tests\lingotek\Functional\LingotekContentModerationTest::addReviewStateToEditorialWorkflow()
- 4.0.x tests/src/Functional/LingotekContentModerationTest.php \Drupal\Tests\lingotek\Functional\LingotekContentModerationTest::addReviewStateToEditorialWorkflow()
- 3.0.x tests/src/Functional/LingotekContentModerationTest.php \Drupal\Tests\lingotek\Functional\LingotekContentModerationTest::addReviewStateToEditorialWorkflow()
- 3.1.x tests/src/Functional/LingotekContentModerationTest.php \Drupal\Tests\lingotek\Functional\LingotekContentModerationTest::addReviewStateToEditorialWorkflow()
- 3.2.x tests/src/Functional/LingotekContentModerationTest.php \Drupal\Tests\lingotek\Functional\LingotekContentModerationTest::addReviewStateToEditorialWorkflow()
- 3.3.x tests/src/Functional/LingotekContentModerationTest.php \Drupal\Tests\lingotek\Functional\LingotekContentModerationTest::addReviewStateToEditorialWorkflow()
- 3.4.x tests/src/Functional/LingotekContentModerationTest.php \Drupal\Tests\lingotek\Functional\LingotekContentModerationTest::addReviewStateToEditorialWorkflow()
- 3.5.x tests/src/Functional/LingotekContentModerationTest.php \Drupal\Tests\lingotek\Functional\LingotekContentModerationTest::addReviewStateToEditorialWorkflow()
- 3.7.x tests/src/Functional/LingotekContentModerationTest.php \Drupal\Tests\lingotek\Functional\LingotekContentModerationTest::addReviewStateToEditorialWorkflow()
- 3.8.x tests/src/Functional/LingotekContentModerationTest.php \Drupal\Tests\lingotek\Functional\LingotekContentModerationTest::addReviewStateToEditorialWorkflow()
Adds a review state to the editorial workflow.
1 call to LingotekContentModerationTest::addReviewStateToEditorialWorkflow()
- LingotekContentModerationTest::setUp in tests/
src/ Functional/ LingotekContentModerationTest.php
File
- tests/
src/ Functional/ LingotekContentModerationTest.php, line 491
Class
- LingotekContentModerationTest
- Tests setting up the integration with content moderation.
Namespace
Drupal\Tests\lingotek\FunctionalCode
protected function addReviewStateToEditorialWorkflow() {
// Add a "Needs review" state to the editorial workflow.
$workflow = Workflow::load('editorial');
$definition = $workflow
->getTypePlugin();
$definition
->addState('needs_review', 'Needs Review');
$definition
->addTransition('request_review', 'Request Review', [
'draft',
], 'needs_review');
$definition
->addTransition('publish_review', 'Publish Review', [
'needs_review',
], 'published');
$definition
->addTransition('back_to_draft', 'Back to Draft', [
'needs_review',
], 'draft');
$workflow
->save();
}