You are here

function linkit_entity_info_alter in Linkit 7.2

Implements hook_entity_info_alter();

Control which enteties that can be used by Linkit. Other modules can easy implement this hook aswell and make their enteties usable with Linkit or change directly in the the hook_entity_info().

File

./linkit.module, line 993
Main file for linkit module.

Code

function linkit_entity_info_alter(&$entity_info) {

  // An array of entity names that is allowed to be used in Linkit.
  $allowed = array(
    'node',
    'user',
    'taxonomy_term',
    'file',
  );
  foreach ($allowed as $entity_name) {
    if (isset($entity_info[$entity_name])) {
      $entity_info[$entity_name]['linkit'] = TRUE;
    }
  }
}