public function ForumAliasType::applies in Pathauto 8
Determines if this plugin type can apply a given object.
Parameters
object $object: The object used to determine if this plugin can apply.
Return value
bool Whether this plugin applies to the given object.
Overrides EntityAliasTypeBase::applies
File
- src/
Plugin/ pathauto/ AliasType/ ForumAliasType.php, line 97
Class
- ForumAliasType
- A pathauto alias type plugin for forum terms.
Namespace
Drupal\pathauto\Plugin\pathauto\AliasTypeCode
public function applies($object) {
if (parent::applies($object)) {
/** @var \Drupal\taxonomy\TermInterface $object */
$vid = $this->configFactory
->get('forum.settings')
->get('vocabulary');
return $object
->bundle() == $vid;
}
return FALSE;
}