function Workflow::loadMultipleByType

Same name in other branches
  1. 8.9.x core/modules/workflows/src/Entity/Workflow.php \Drupal\workflows\Entity\Workflow::loadMultipleByType()
  2. 10 core/modules/workflows/src/Entity/Workflow.php \Drupal\workflows\Entity\Workflow::loadMultipleByType()
  3. 11.x core/modules/workflows/src/Entity/Workflow.php \Drupal\workflows\Entity\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

7 calls to Workflow::loadMultipleByType()
ComplexWorkflowTypeTest::testLoadMultipleByType in core/modules/workflows/tests/src/Kernel/ComplexWorkflowTypeTest.php
@covers \Drupal\workflows\Entity\Workflow::loadMultipleByType
ContentModerationRouteSubscriber::getModeratedEntityTypes in core/modules/content_moderation/src/Routing/ContentModerationRouteSubscriber.php
Returns the moderated entity types.
ContentTranslationDeleteAccess::checkAccess in core/modules/content_translation/src/Access/ContentTranslationDeleteAccess.php
Checks access to translation deletion for the specified entity.
ContentTranslationManager::isPendingRevisionSupportEnabled in core/modules/content_translation/src/ContentTranslationManager.php
Checks whether support for pending revisions should be enabled.
content_moderation_entity_bundle_delete in core/modules/content_moderation/content_moderation.module
Implements hook_entity_bundle_delete().

... See full list

File

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

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.