Further modules included.
[yaffs-website] / web / modules / contrib / drupalmoduleupgrader / src / Plugin / DMU / Converter / HookFieldAttachDeleteBundle.php
1 <?php
2
3 namespace Drupal\drupalmoduleupgrader\Plugin\DMU\Converter;
4
5 use Drupal\drupalmoduleupgrader\ConverterBase;
6 use Drupal\drupalmoduleupgrader\TargetInterface;
7 use Pharborist\DocCommentNode;
8
9 /**
10  * @Converter(
11  *  id = "hook_field_attach_delete_bundle",
12  *  description = @Translation("Adds a FIXME notice to hook_field_attach_delete_bundle()."),
13  *  hook = "hook_field_attach_delete_bundle",
14  *  fixme = @Translation("@FIXME
15 hook_field_attach_delete_bundle() has been renamed to hook_entity_bundle_delete(),
16 and it no longer accepts an $instances argument. This cannot be converted
17 automatically because it's likely to affect the hook's logic, so you'll need to
18 modify this function manually.
19
20 For more information, see https://www.drupal.org/node/1964766.
21 ")
22  * )
23  */
24 class HookFieldAttachDeleteBundle extends ConverterBase {
25
26   /**
27    * {@inheritdoc}
28    */
29   public function convert(TargetInterface $target) {
30     $hook = $target
31       ->getIndexer('function')
32       ->get($this->pluginDefinition['hook'])
33       ->before(DocCommentNode::create($this->pluginDefinition['fixme']));
34
35     $target->save($hook);
36   }
37
38 }