You are here

function synonyms_search_behavior_search_enabled in Synonyms 7

Callback for when the behavior is enabled.

Trigger re-indexing of all the nodes that reference terms from the vocabulary where the change has taken place.

1 string reference to 'synonyms_search_behavior_search_enabled'
search.inc in synonyms_search/plugins/behavior/search.inc

File

synonyms_search/plugins/behavior/search.inc, line 22

Code

function synonyms_search_behavior_search_enabled($behavior_definition, $behavior_implementation) {
  if ($behavior_implementation['entity_type'] == 'taxonomy_term') {
    module_load_include('inc', 'synonyms_search', 'synonyms_search.pages');
    synonyms_search_reindex_nodes_by_vocabulary(taxonomy_vocabulary_machine_name_load($behavior_implementation['bundle']));
  }
}