function EntityFetchByField::refineContextDefinitions

Overrides RulesActionBase::refineContextDefinitions

File

src/Plugin/RulesAction/EntityFetchByField.php, line 90

Class

EntityFetchByField
Provides a 'Fetch entities by field' 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}");
    }
}