protected function LingotekNodeBulkFormWithContentModerationTest::addReviewStateToEditorialWorkflow in Lingotek Translation 3.4.x
Same name and namespace in other branches
- 4.0.x tests/src/Functional/Form/LingotekNodeBulkFormWithContentModerationTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekNodeBulkFormWithContentModerationTest::addReviewStateToEditorialWorkflow()
- 3.5.x tests/src/Functional/Form/LingotekNodeBulkFormWithContentModerationTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekNodeBulkFormWithContentModerationTest::addReviewStateToEditorialWorkflow()
- 3.6.x tests/src/Functional/Form/LingotekNodeBulkFormWithContentModerationTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekNodeBulkFormWithContentModerationTest::addReviewStateToEditorialWorkflow()
- 3.7.x tests/src/Functional/Form/LingotekNodeBulkFormWithContentModerationTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekNodeBulkFormWithContentModerationTest::addReviewStateToEditorialWorkflow()
- 3.8.x tests/src/Functional/Form/LingotekNodeBulkFormWithContentModerationTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekNodeBulkFormWithContentModerationTest::addReviewStateToEditorialWorkflow()
Adds a review state to the editorial workflow.
1 call to LingotekNodeBulkFormWithContentModerationTest::addReviewStateToEditorialWorkflow()
- LingotekNodeBulkFormWithContentModerationTest::setUp in tests/
src/ Functional/ Form/ LingotekNodeBulkFormWithContentModerationTest.php
File
- tests/
src/ Functional/ Form/ LingotekNodeBulkFormWithContentModerationTest.php, line 140
Class
- LingotekNodeBulkFormWithContentModerationTest
- Tests the bulk management form.
Namespace
Drupal\Tests\lingotek\Functional\FormCode
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();
}