You are here

public function RealisticDummyContentDrupalTrait::newVocabularyTerm in Realistic Dummy Content 7.2

Same name and namespace in other branches
  1. 8.2 api/src/traits/RealisticDummyContentDrupalTrait.php \Drupal\realistic_dummy_content_api\traits\RealisticDummyContentDrupalTrait::newVocabularyTerm()
  2. 3.x api/src/traits/RealisticDummyContentDrupalTrait.php \Drupal\realistic_dummy_content_api\traits\RealisticDummyContentDrupalTrait::newVocabularyTerm()

Mockable wrapper around Framework::newVocabularyTerm().

1 call to RealisticDummyContentDrupalTrait::newVocabularyTerm()
RealisticDummyContentTermReferenceField::getTid in api/src/includes/RealisticDummyContentTermReferenceField.php
Returns term id for a term which is either existing or created on the fly.

File

api/src/traits/RealisticDummyContentDrupalTrait.php, line 32

Class

RealisticDummyContentDrupalTrait
A trait with wrappers to system calls.

Namespace

Drupal\realistic_dummy_content_api\traits

Code

public function newVocabularyTerm($vocabulary, $name) {
  return Framework::instance()
    ->newVocabularyTerm($vocabulary, $name);
}