You are here

MultiversionFieldItemList.php in Multiversion 8.2

Same filename and directory in other branches
  1. 8 src/MultiversionFieldItemList.php

File

src/MultiversionFieldItemList.php
View source
<?php

namespace Drupal\multiversion;

use Drupal\pathauto\PathautoFieldItemList;
class MultiversionFieldItemList extends PathautoFieldItemList {

  /**
   * @inheritDoc
   */
  public function delete() {
    \Drupal::service('pathauto.alias_storage_helper')
      ->deleteEntityPathAll($this
      ->getEntity());
    if ($first = $this
      ->first()) {
      $first
        ->get('pathauto')
        ->purge();
    }
  }

}

Classes