You are here

public function HookToYAML::execute in Drupal 7 to 8/9 Module Upgrader 8

Executes the plugin.

Overrides ExecutableInterface::execute

File

src/Plugin/DMU/Fixer/HookToYAML.php, line 15

Class

HookToYAML
Plugin annotation @Fixer( id = "hook_to_YAML" )

Namespace

Drupal\drupalmoduleupgrader\Plugin\DMU\Fixer

Code

public function execute() {
  $destination = $this
    ->getUnaliasedPath($this->configuration['destination']);
  $data = $this->target
    ->executeHook($this->configuration['hook']);
  file_put_contents($destination, YAML::encode($data));
}