You are here

public static function Asset::getWorkflowId in farmOS 2.x

Gets the workflow ID for the state field.

Parameters

\Drupal\asset\Entity\AssetInterface $asset: The asset entity.

Return value

string The workflow ID.

File

modules/core/asset/src/Entity/Asset.php, line 280

Class

Asset
Defines the asset entity.

Namespace

Drupal\asset\Entity

Code

public static function getWorkflowId(AssetInterface $asset) {
  $workflow = AssetType::load($asset
    ->bundle())
    ->getWorkflowId();
  return $workflow;
}