Untitled
unknown
plain_text
a year ago
557 B
12
Indexable
/**
* Implements hook_entity_query_alter().
*/
function your_module_name_entity_query_alter(\Drupal\Core\Entity\Query\QueryInterface $query) {
// Get the context for the query.
$entity_type = $query->getEntityTypeId();
$conditions = $query->getConditions();
// Check if the entity type is 'node' and the field is 'field_meeting'.
if ($entity_type === 'node' && isset($conditions['field_meeting_type_target_id'])) {
// Add condition to filter by 'field_meeting_type' value 'nexus'.
$query->condition('field_meeting_type', 'nexus');
}
}Editor is loading...
Leave a Comment