function synonyms_behavior_implementation_info in Synonyms 7
Collect info on available synonyms behavior implementations.
Parameters
string $entity_type: Entity type whose available synonyms behavior implementations to collect
string $bundle: Bundle whose available synonyms behavior implementations to collect
string $behavior: Name of behavior whose available synonyms behavior implementations to collect
Return value
array Array of available synonyms behavior implementations. Each synonym behavior implementation will be an array with the following structure:
- provider: (string) Machine name of the synonyms behavior implementation
- label: (string) Human name of the synonyms behavior implementation
- class: (string) Name of PHP class that implements behavior interface which is stated in cTools behavior plugin definition
- entity_type: (string) Entity type that corresponds to this synonyms behavior implementation
- bundle: (string) Bundle that corresponds to this synonyms behavior implementation
- behavior: (string) Name of behavior that corresponds to this synonyms behavior implementation
- module: (string) Name of the module that provides this synonyms behavior implementation
7 calls to synonyms_behavior_implementation_info()
- AbstractAutocompleteSynonymsWebTestCase::synonymAutocompleteResult in ./
synonyms.test - Return expected autocomplete menu path result.
- AbstractSelectSynonymsWebTestCase::assertSynonymsSelect in ./
synonyms.test - Assert correctness of the synonyms-friendly select widget.
- synonyms_behavior_get in ./
synonyms.module - Load function for existing implementations of synonyms behaviors.
- synonyms_behavior_settings_unpack in ./
synonyms.module - Execute unpacking on the just loaded synonyms behavior implementations.
- synonyms_bundle_load in ./
synonyms.module - Test if provided entity type and bundle are applicable for having synonyms.
File
- ./
synonyms.module, line 1057 - Provide synonyms feature for Drupal entities.
Code
function synonyms_behavior_implementation_info($entity_type, $bundle, $behavior) {
$providers = array();
foreach (module_implements('synonyms_behavior_implementation_info') as $module) {
foreach (module_invoke($module, 'synonyms_behavior_implementation_info', $entity_type, $bundle, $behavior) as $provider) {
$provider['entity_type'] = $entity_type;
$provider['behavior'] = $behavior;
$provider['bundle'] = $bundle;
$provider['module'] = $module;
$providers[$provider['provider']] = $provider;
}
}
return $providers;
}