function message_type_category_load in Message 7
Message type category loader.
Parameters
$name: (optional) The name for this message type category. If no type is given all existing message types category are returned.
Return value
MessageType Returns a fully-loaded message type category definition if a name is passed. Else an array containing all message types category is returned.
3 calls to message_type_category_load()
- message_handler_filter_message_type_category::get_value_options in includes/
views/ handlers/ message_handler_filter_message_type_category.inc - Child classes should be used to override this function and set the 'value options', unless 'options callback' is defined as a valid function or static public method to generate these values.
- message_type_category_create in ./
message.module - Creates a new message type category.
- message_type_form in includes/
message.admin.inc - Generates the message type editing form.
File
- ./
message.module, line 764 - API functions to manipulate messages.
Code
function message_type_category_load($name = NULL) {
// Replace dashes with underscores so this can be used as menu argument
// loader too.
$types = entity_load_multiple_by_name('message_type_category', isset($name) ? array(
strtr($name, array(
'-' => '_',
)),
) : FALSE);
if (isset($name)) {
return isset($types[$name]) ? $types[$name] : FALSE;
}
return $types;
}