ComplexTestType.php

Same filename and directory in other branches
  1. 9 core/modules/workflows/tests/modules/workflow_type_test/src/Plugin/WorkflowType/ComplexTestType.php
  2. 8.9.x core/modules/workflows/tests/modules/workflow_type_test/src/Plugin/WorkflowType/ComplexTestType.php
  3. 11.x core/modules/workflows/tests/modules/workflow_type_test/src/Plugin/WorkflowType/ComplexTestType.php

Namespace

Drupal\workflow_type_test\Plugin\WorkflowType

File

core/modules/workflows/tests/modules/workflow_type_test/src/Plugin/WorkflowType/ComplexTestType.php

View source
<?php

namespace Drupal\workflow_type_test\Plugin\WorkflowType;

use Drupal\Core\StringTranslation\StringTranslationTrait;
use Drupal\Core\StringTranslation\TranslatableMarkup;
use Drupal\workflows\Attribute\WorkflowType;
use Drupal\workflows\Plugin\WorkflowTypeBase;

/**
 * Test workflow type.
 */
class ComplexTestType extends WorkflowTypeBase {
    use StringTranslationTrait;
    
    /**
     * {@inheritdoc}
     */
    public function onDependencyRemoval(array $dependencies) {
        // Always return TRUE to allow the logic in
        // \Drupal\workflows\Entity\Workflow::onDependencyRemoval() to be tested.
        return TRUE;
    }
    
    /**
     * {@inheritdoc}
     */
    public function defaultConfiguration() {
        return parent::defaultConfiguration() + [
            'example_setting' => '',
        ];
    }

}

Classes

Title Deprecated Summary
ComplexTestType Test workflow type.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.