function autoassignrole_add_page in Auto Assign Role 7
Function to add role-specific page.
Parameters
array $page: The details of the page to be added.
Return value
bool Return true if successful | false.
1 call to autoassignrole_add_page()
- autoassignrole_page_form_submit in ./
autoassignrole.admin.inc - Implements hook_form_submit().
File
- ./
autoassignrole.admin.inc, line 417 - Administrative functionality for auto assign role.
Code
function autoassignrole_add_page($page) {
$return_value = FALSE;
try {
$return_value = db_insert('autoassignrole_page')
->fields($page)
->execute();
} catch (Exception $e) {
drupal_set_message(t('db_insert failed. Message = %message, query = %query', array(
'%message' => $e
->getMessage(),
'%query' => $e->query_string,
)), 'error');
}
return $return_value;
}