function properties_compare_list_exists in Dynamic properties 7
Checks if an entity is already in the compare list.
Parameters
$entity_type: Entity type of the entity that should be checked.
$entity: Entity object that should be checked.
1 call to properties_compare_list_exists()
- properties_compare_add_form in properties_compare/
properties_compare.module - Form builder function; displays a form to add an entity to the compare list.
File
- properties_compare/
properties_compare.module, line 173 - Module file for privatemsg_compare module.
Code
function properties_compare_list_exists($entity_type, $entity) {
$list = properties_compare_list();
list($id, , ) = entity_extract_ids($entity_type, $entity);
$key = $entity_type . '_' . $id;
return isset($list[$key]);
}