function Workflow::loadMultipleByType

Loads all workflows of the provided type.

Parameters

string $type: The workflow type to load all workflows for.

Return value

static[] An array of workflow objects of the provided workflow type, indexed by their IDs.

@see \Drupal\workflows\Annotation\WorkflowType

6 calls to Workflow::loadMultipleByType()
ComplexWorkflowTypeTest::testLoadMultipleByType in core/modules/workflows/tests/src/Kernel/ComplexWorkflowTypeTest.php
Tests load multiple by type.
ContentModerationHooks::entityBundleDelete in core/modules/content_moderation/src/Hook/ContentModerationHooks.php
Implements hook_entity_bundle_delete().
ContentModerationHooks::entityBundleInfoAlter in core/modules/content_moderation/src/Hook/ContentModerationHooks.php
Implements hook_entity_bundle_info_alter().
ContentModerationRouteSubscriber::getModeratedEntityTypes in core/modules/content_moderation/src/Routing/ContentModerationRouteSubscriber.php
Returns the moderated entity types.
ContentTranslationHooks::entityBundleInfoAlter in core/modules/content_translation/src/Hook/ContentTranslationHooks.php
Implements hook_entity_bundle_info_alter().

... See full list

File

core/modules/workflows/src/Entity/Workflow.php, line 167

Class

Workflow
Defines the workflow entity.

Namespace

Drupal\workflows\Entity

Code

public static function loadMultipleByType($type) {
  return self::loadMultiple(\Drupal::entityQuery('workflow')->condition('type', $type)
    ->execute());
}

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