function EntityFetchById::refineContextDefinitions

Overrides RulesActionBase::refineContextDefinitions

File

src/Plugin/RulesAction/EntityFetchById.php, line 80

Class

EntityFetchById
Provides a 'Fetch entity by id' action.

Namespace

Drupal\rules\Plugin\RulesAction

Code

public function refineContextDefinitions(array $selected_data) {
  if ($type = $this->getContextValue('type')) {
    $this->pluginDefinition['provides']['entity_fetched']
      ->setDataType("entity:{$type}");
  }
}