Skip to content

Instantly share code, notes, and snippets.

@karelbemelmans
karelbemelmans / entityfieldquery.php
Last active December 15, 2015 04:50
EntityFieldQuery snippet
<?php
$query = new EntityFieldQuery();
$entities = $query->entityCondition('entity_type', 'taxonomy_term')
->entityCondition('bundle', 'catalogue')
->propertyCondition('language', $lang)
->fieldCondition('field_export_code', 'value', $code, '=')
->execute();
if (count($entities)) {