You are here

public function FunctionCallModifier::isExecutable in Drupal 7 to 8/9 Module Upgrader 8

Returns if this conversion applies to the target module. If FALSE, the convert() method will not be called.

Parameters

TargetInterface $target: The target module.

Return value

bool

Overrides ConverterBase::isExecutable

File

src/Plugin/DMU/Converter/Functions/FunctionCallModifier.php, line 33

Class

FunctionCallModifier
Base class for converters which modify individual function calls.

Namespace

Drupal\drupalmoduleupgrader\Plugin\DMU\Converter\Functions

Code

public function isExecutable(TargetInterface $target) {

  // Silence 'undefined index' notices if the 'function' key doesn't exist in
  // the plugin definition.
  $function = @($this->pluginDefinition['function'] ?: $this
    ->getPluginId());
  return $target
    ->getIndexer('function_call')
    ->has($function);
}