function entity_property_list_extract_type in Entity API 7
Extracts the contained type for a list type string like list<date>.
Return value
string|false The contained type or FALSE, if the given type string is no list.
10 calls to entity_property_list_extract_type()
- EntityFieldHandlerHelper::options_form in views/
handlers/ entity_views_field_handler_helper.inc - Provide an appropriate default option form for a handler.
- EntityFieldHandlerHelper::option_definition in views/
handlers/ entity_views_field_handler_helper.inc - Provide appropriate default options for a handler.
- EntityListWrapper::__construct in includes/
entity.wrapper.inc - Construct a new wrapper object.
- entity_entity_property_map_data_type in ctools/
relationships/ entity_property.inc - Maps an entity-property data type to ctools types.
- entity_metadata_field_file_validate_item in modules/
callbacks.inc - Callback for validating file field $items.
File
- includes/
entity.property.inc, line 358 - Provides API functions around hook_entity_property_info(). Also see entity.info.inc, which cares for providing entity property info for all core entity types.
Code
function entity_property_list_extract_type($type) {
if (strpos($type, 'list<') === 0 && $type[strlen($type) - 1] == '>') {
return substr($type, 5, -1);
}
return FALSE;
}