You are here

interface TermMergerInterface in Term Merge 8

Provides an interface for a term merger service.

Hierarchy

Expanded class hierarchy of TermMergerInterface

All classes that implement TermMergerInterface

2 files declare their use of TermMergerInterface
MergeTermsConfirm.php in src/Form/MergeTermsConfirm.php
TermMergerDummy.php in tests/src/Kernel/TestDoubles/TermMergerDummy.php

File

src/TermMergerInterface.php, line 10

Namespace

Drupal\term_merge
View source
interface TermMergerInterface {

  /**
   * Merges two or more terms into a new term.
   *
   * @param \Drupal\taxonomy\TermInterface[] $termsToMerge
   *   The terms to merge.
   * @param string $newTermLabel
   *   The label of the new term.
   *
   * @return \Drupal\taxonomy\TermInterface
   *   The newly created term.
   */
  public function mergeIntoNewTerm(array $termsToMerge, $newTermLabel);

  /**
   * Merges one or more terms into an existing term.
   *
   * @param array $termsToMerge
   *   The terms to merge.
   * @param \Drupal\taxonomy\TermInterface $targetTerm
   *   The term to merge them into.
   */
  public function mergeIntoTerm(array $termsToMerge, TermInterface $targetTerm);

}

Members

Namesort descending Modifiers Type Description Overrides
TermMergerInterface::mergeIntoNewTerm public function Merges two or more terms into a new term. 2
TermMergerInterface::mergeIntoTerm public function Merges one or more terms into an existing term. 2