You are here

field_property.install in Field property 7

Install, update, and uninstall functions for the field_property module.

File

field_property.install
View source
<?php

/**
 * @file
 * Install, update, and uninstall functions for the field_property module.
 */

/**
 * Implements hook_uninstall().
 */
function field_property_uninstall() {

  // Remove all 'is_property' values from field instances.
  foreach (field_info_instances() as $entity_type => $bundles) {
    foreach ($bundles as $bundle => $instances) {
      foreach ($instances as $instance) {
        if (!empty($instance['is_property'])) {
          unset($instance['is_property']);
          field_update_instance($instance);
        }
      }
    }
  }
}

Functions

Namesort descending Description
field_property_uninstall Implements hook_uninstall().