Term::setFormat

public Term::setFormat($format)

Sets the text format name for the term's description.

Parameters

string $format: The term's description text format.

Return value

$this

Overrides TermInterface::setFormat

File

core/modules/taxonomy/src/Entity/Term.php, line 195

Class

Term
Defines the taxonomy term entity.

Namespace

Drupal\taxonomy\Entity

Code

public function setFormat($format) {
  $this->get('description')->format = $format;
  return $this;
}
doc_Drupal
2016-10-29 09:47:04
Comments
Leave a Comment

Please login to continue.