You are here

function pathauto_i18n_init_property in Pathauto i18n 7

Same name and namespace in other branches
  1. 8 pathauto_i18n.module \pathauto_i18n_init_property()

Init the property.

6 calls to pathauto_i18n_init_property()
pathauto_i18n_node_node_insert in modules/pathauto_i18n_node/pathauto_i18n_node.module
Implements hook_node_insert().
pathauto_i18n_node_node_update in modules/pathauto_i18n_node/pathauto_i18n_node.module
Implements hook_node_update().
pathauto_i18n_taxonomy_taxonomy_term_insert in modules/pathauto_i18n_taxonomy/pathauto_i18n_taxonomy.module
Implements hook_taxonomy_term_insert().
pathauto_i18n_taxonomy_taxonomy_term_update in modules/pathauto_i18n_taxonomy/pathauto_i18n_taxonomy.module
Implements hook_taxonomy_term_update().
pathauto_i18n_user_user_insert in modules/pathauto_i18n_user/pathauto_i18n_user.module
Implements hook_user_insert().

... See full list

File

./pathauto_i18n.module, line 240
Provides common functions and callbacks for pathauto_i18n submodules.

Code

function pathauto_i18n_init_property(&$entity, $type, $bundle) {
  $default = pathauto_i18n_get_bundle_default($type, $bundle);
  switch ($type) {
    case 'user':
      $entity->pathauto_i18n_status = isset($entity->pathauto_i18n_status) ? $entity->pathauto_i18n_status : $default;
      break;
    default:
      $entity->path['pathauto_i18n_status'] = isset($entity->path['pathauto_i18n_status']) ? $entity->path['pathauto_i18n_status'] : $default;
      break;
  }
}