function _config_pages_get_names in Config Pages 7
Get names for all config_pages types, keyed by the type name.
Return value
An associative array of objects keyed by type name with information about config page type. Each object has properties:
- name: The machine name.
- label: The human name.
- id: The type ID.
1 call to _config_pages_get_names()
- config_pages_entity_info in ./
config_pages.module - Implement hook_entity_info().
File
- ./
config_pages.module, line 342 - This module is based on Model module (https://drupal.org/project/model) and most of the comments left untouched but have entity types renamed. Suuport for features added.
Code
function _config_pages_get_names() {
$names =& drupal_static(__FUNCTION__);
if (!isset($names)) {
$names = db_query('SELECT type, label, id FROM {config_pages_type}')
->fetchAllAssoc('type');
}
return $names;
}