public function Synonym::setActive in Search API Synonym 8
Sets the active status of a Synonym.
Parameters
bool $active: TRUE to set this Synonym to active, FALSE to set it to not active.
Return value
\Drupal\search_api_synonym\SynonymInterface The called Synonym entity.
Overrides SynonymInterface::setActive
File
- src/
Entity/ Synonym.php, line 171
Class
- Synonym
- Defines the Synonym entity.
Namespace
Drupal\search_api_synonym\EntityCode
public function setActive($active) {
$this
->set('status', $active ? SYNONYM_ACTIVE : SYNONYM_NOT_ACTIVE);
return $this;
}