function entity_background_generate_selector in Entity background 7
Converts a selector string into a proper selector path.
Parameters
$entity_type: An entity type which selectors should be generated.
$entity: An entity object which selectors should be generated.
Return value
string CSS selector that identifies the entity wrapper.
1 call to entity_background_generate_selector()
- entity_background_load_background in ./
entity_background.module - Loads background plugins.
File
- ./
entity_background.module, line 178 - Module file entity background.
Code
function entity_background_generate_selector($entity_type, $entity) {
$selector = entity_background_get_selector($entity_type);
// Get entity ID.
list($id) = entity_extract_ids($entity_type, $entity);
$selector = str_replace('[entity-id]', $id, $selector);
return $selector;
}