function config_pages_get_types in Config Pages 7
Gets an array of all config_pages types, keyed by the type name.
Parameters
$type_name: If set, the type with the given name is returned.
Return value
ConfigPagesType[] Depending whether $type isset, an array of config_pages types or a single one.
7 calls to config_pages_get_types()
- ConfigPagesUIController::hook_menu in ./
config_pages.admin.inc - Overrides hook_menu() defaults. Main reason for doing this is that parent class hook_menu() is optimized for entity type administration.
- config_pages_context_groups in ./
config_pages.inc - Get available context groups.
- config_pages_features_export in ./
config_pages.features.inc - Implements hook_features_export().
- config_pages_features_export_options in ./
config_pages.features.inc - Implements hook_features_export_options().
- config_pages_form_wrapper in ./
config_pages.admin.inc - Form callback wrapper: create or edit a config_pages.
1 string reference to 'config_pages_get_types'
- config_pages_type_form in ./
config_pages.type.admin.inc - Generates the config_pages type editing form.
File
- ./
config_pages.module, line 325 - 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_types($type_name = NULL) {
// entity_load will get the Entity controller for our config_pages entity and call the load
// function of that object - we are loading entities by name here.
$types = entity_load_multiple_by_name('config_pages_type', isset($type_name) ? array(
$type_name,
) : FALSE);
return isset($type_name) ? reset($types) : $types;
}