function FieldInfo::flush

Clears the "static" and persistent caches.

File

modules/field/field.info.class.inc, line 97

Class

FieldInfo
Provides field and instance definitions for the current runtime environment.

Code

public function flush() {
    $this->fieldMap = NULL;
    $this->fieldsById = array();
    $this->fieldIdsByName = array();
    $this->loadedAllFields = FALSE;
    $this->unknownFields = array();
    $this->bundleInstances = array();
    $this->loadedAllInstances = FALSE;
    $this->emptyBundles = array();
    $this->bundleExtraFields = array();
    cache_clear_all('field_info:', 'cache_field', TRUE);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.