function _scald_parse_machine_name in Scald: Media Management made easy 7
Returns the machine name from element name.
Element name is built on {machine name}_{setting name} where 'machine name' is either type, context machine name or anything else. Historically, the 'setting name' is limited to exactly 5 characters for easy parsing.
3 calls to _scald_parse_machine_name()
- scald_admin_contexts_form_submit in includes/
scald.admin.inc - Submit handler for Scald Contexts admin settings form.
- scald_admin_contexts_player_ajax in includes/
scald.admin.inc - Re-generates the player settings form.
- scald_admin_type_form_submit in includes/
scald.admin.inc - Submit function for admin settings for Scald Types.
File
- includes/
scald.admin.inc, line 641
Code
function _scald_parse_machine_name($element_name) {
$position = strrpos($element_name, '_');
return substr($element_name, 0, $position);
}