function asset_type_get_names in Asset 7
Returns a list of available asset type names.
Return value
array Asset type names, keyed by the type.
3 calls to asset_type_get_names()
- AssetFeedsProcessor::configForm in modules/
asset_feeds/ AssetFeedsProcessor.inc - Override parent::configForm().
- asset_generate_assets_form in modules/
asset_generate/ asset_generate.module - Form callback for asset generation
- drush_asset_generate_generate_assets in modules/
asset_generate/ asset_generate.drush.inc - Command callback. Generate a number of nodes and comments.
1 string reference to 'asset_type_get_names'
- asset_entity_property_info_alter in ./
asset.module - Implements hook_entity_property_info_alter(). @todo: Why we are using alter instead of hook_entity_property_info() like Entity module originally does?
File
- ./
asset.module, line 142 - Asset module.
Code
function asset_type_get_names() {
$names = array();
$types = assets_get_types();
foreach ($types as $type => $type_object) {
$names[$type] = $type_object->name;
}
if (!empty($names)) {
asort($names);
}
return $names;
}