You are here

public function NewTermStorage::set in Super Term Reference Autocomplete Widget 8

Adds a new term to the storage.

Parameters

string $bundle: The vocabulary the term will be a part of.

string $tree_path: A string containing the hierarchy of where the term will exist once it is created.

\Drupal\taxonomy\Entity\Term $term: The newly created term.

File

src/NewTermStorage.php, line 49

Class

NewTermStorage
Stores terms which have been created by Straw but not yet saved by Drupal.

Namespace

Drupal\straw

Code

public function set($bundle, $tree_path, Term $term) {
  $this->termStorage[$bundle][$tree_path] = $term;
}