You are here

function farm_asset_init in farmOS 7

Implements hook_init().

File

modules/farm/farm_asset/farm_asset.module, line 15
Farm asset - A farm asset entity type.

Code

function farm_asset_init() {
  global $conf;

  // If the pathauto_entity module is enabled, ensure that farm_asset entities
  // are enabled in it.
  if (module_exists('pathauto_entity')) {
    if (empty($conf['pathauto_entity_available_entity_types'])) {
      $conf['pathauto_entity_available_entity_types'] = array();
    }
    $conf['pathauto_entity_available_entity_types']['farm_asset'] = 'farm_asset';
  }
}