You are here

public function Target::implementsHook in Drupal 7 to 8/9 Module Upgrader 8

Returns if the target module implements a particular hook.

Parameters

string $hook: The hook to look for, without the hook_ prefix.

Return value

bool

Overrides TargetInterface::implementsHook

1 call to Target::implementsHook()
Target::executeHook in src/Target.php
Executes a hook implementation and returns the result.

File

src/Target.php, line 186

Class

Target
Default implementation of TargetInterface.

Namespace

Drupal\drupalmoduleupgrader

Code

public function implementsHook($hook) {
  return $this
    ->getIndexer('function')
    ->has('hook_' . $hook);
}