drupalmoduleupgrader-8.x-1.5/src/Plugin/DMU/Fixer/Delete.php

src/Plugin/DMU/Fixer/Delete.php
<?php

namespace Drupal\drupalmoduleupgrader\Plugin\DMU\Fixer;

use Drupal\drupalmoduleupgrader\FixerBase;

/**
 * @Fixer(
 *  id = "delete"
 * )
 */
class Delete extends FixerBase {

  use NodeCollectorTrait;

  public function execute() {
    foreach ($this->getObjects() as $node) {
      $node->remove();
    }
    $this->target->save();

    // Rebuild the index so it won't contain non-existent crap.
    $indexer = $this->target->getIndexer($this->configuration['type']);
    $indexer->clear();
    $indexer->build();
  }

}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc