function DataConvert::refineContextDefinitions

Overrides RulesActionBase::refineContextDefinitions

File

src/Plugin/RulesAction/DataConvert.php, line 51

Class

DataConvert
Provides an action to convert data from one type to another.

Namespace

Drupal\rules\Plugin\RulesAction

Code

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