Further modules included.
[yaffs-website] / web / modules / contrib / drupalmoduleupgrader / src / Plugin / DMU / Fixer / HookToYAML.php
1 <?php
2
3 /**
4  * @file
5  * Contains \Drupal\drupalmoduleupgrader\Plugin\DMU\Fixer\HookToYAML.
6  */
7
8 namespace Drupal\drupalmoduleupgrader\Plugin\DMU\Fixer;
9
10 use Drupal\Component\Serialization\Yaml as YAML;
11 use Drupal\drupalmoduleupgrader\FixerBase;
12
13 /**
14  * @Fixer(
15  *  id = "hook_to_YAML"
16  * )
17  */
18 class HookToYAML extends FixerBase {
19
20   public function execute() {
21     $destination = $this->getUnaliasedPath($this->configuration['destination']);
22     $data = $this->target->executeHook($this->configuration['hook']);
23     file_put_contents($destination, YAML::encode($data));
24   }
25
26 }