function LinkitSearchPluginTaxonomy_term::createGroup in Linkit 7.3
Overrides LinkitSearchPluginEntity::createGroup().
Overrides LinkitSearchPluginEntity::createGroup
File
- plugins/
linkit_search/ taxonomy_term.class.php, line 37 - Define Linkit term search plugin class.
Class
- LinkitSearchPluginTaxonomy_term
- Reprecents a Linkit term search plugin.
Code
function createGroup($entity) {
// Get the entity label.
$group = $this->entity_info['label'];
if (isset($this->conf['group_by_bundle']) && $this->conf['group_by_bundle']) {
$bundles = $this->entity_info['bundles'];
$bundle_name = $bundles[$entity->vocabulary_machine_name]['label'];
$group .= ' - ' . check_plain($bundle_name);
}
return $group;
}