Version 1
[yaffs-website] / web / modules / contrib / pathauto / src / AliasTypeBatchUpdateInterface.php
diff --git a/web/modules/contrib/pathauto/src/AliasTypeBatchUpdateInterface.php b/web/modules/contrib/pathauto/src/AliasTypeBatchUpdateInterface.php
new file mode 100644 (file)
index 0000000..03f3929
--- /dev/null
@@ -0,0 +1,31 @@
+<?php
+
+namespace Drupal\pathauto;
+
+/**
+ * Alias types that support batch updates and deletions.
+ */
+interface AliasTypeBatchUpdateInterface extends AliasTypeInterface {
+
+  /**
+   * Gets called to batch update all entries.
+   *
+   * @param string $action
+   *   One of:
+   *   - 'create' to generate a URL alias for paths having none.
+   *   - 'update' to recreate the URL alias for paths already having one, useful if the pattern changed.
+   *   - 'all' to do both actions above at the same time.
+   * @param array $context
+   *   Batch context.
+   */
+  public function batchUpdate($action, &$context);
+
+  /**
+   * Gets called to batch delete all aliases created by pathauto.
+   *
+   * @param array $context
+   *   Batch context.
+   */
+  public function batchDelete(&$context);
+
+}