You are here

protected function TaxonomyTermController::cacheGet in Drupal 7

Gets entities from the static cache.

Parameters

$ids: If not empty, return entities that match these IDs.

$conditions: If set, return entities that match all of these conditions.

Return value

Array of entities from the entity cache.

Overrides DrupalDefaultEntityController::cacheGet

File

modules/taxonomy/taxonomy.module, line 1271
Enables the organization of content into categories.

Class

TaxonomyTermController
Controller class for taxonomy terms.

Code

protected function cacheGet($ids, $conditions = array()) {
  $terms = parent::cacheGet($ids, $conditions);

  // Name matching is case insensitive, note that with some collations
  // LOWER() and drupal_strtolower() may return different results.
  foreach ($terms as $term) {
    $term_values = (array) $term;
    if (isset($conditions['name']) && drupal_strtolower($conditions['name'] != drupal_strtolower($term_values['name']))) {
      unset($terms[$term->tid]);
    }
  }
  return $terms;
}