Created
September 20, 2014 11:50
-
-
Save kitikonti/6bda8d72ed0ac48a02e2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$query = new EntityFieldQuery(); | |
$query->entityCondition('entity_type', 'taxonomy_term') | |
->entityCondition('bundle', 'property_country_city') | |
->fieldCondition('name_field', 'value', $city, '=') | |
->range(0, 1) | |
->addTag('term_is_child_of') | |
->addMetaData('parent_term_id', $country_id) | |
->addMetaData('account', user_load(1)); // Run the query as user 1. | |
$result = $query->execute(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment