Further modules included.
[yaffs-website] / web / modules / contrib / drupalmoduleupgrader / src / Plugin / DMU / Converter / HookFieldAttachCreateBundle.php
1 <?php
2
3 namespace Drupal\drupalmoduleupgrader\Plugin\DMU\Converter;
4
5 use Drupal\drupalmoduleupgrader\ConverterBase;
6 use Drupal\drupalmoduleupgrader\TargetInterface;
7
8 /**
9  * @Converter(
10  *  id = "hook_field_attach_create_bundle",
11  *  description = @Translation("Renames hook_field_attach_create_bundle()."),
12  *  hook = "hook_field_attach_create_bundle"
13  * )
14  */
15 class HookFieldAttachCreateBundle extends ConverterBase {
16
17   /**
18    * {@inheritdoc}
19    */
20   public function convert(TargetInterface $target) {
21     $hook = $target
22       ->getIndexer('function')
23       ->get($this->pluginDefinition['hook'])
24       ->setName($target->id() . '_entity_bundle_create');
25
26     $target->save($hook);
27   }
28
29 }