You are here

function homebox_admin_form_to_page in Homebox 6.3

Same name and namespace in other branches
  1. 6.2 homebox.admin.inc \homebox_admin_form_to_page()
  2. 7.3 homebox.admin.inc \homebox_admin_form_to_page()
  3. 7.2 homebox.admin.inc \homebox_admin_form_to_page()
1 call to homebox_admin_form_to_page()
homebox_admin_page_submit in ./homebox.admin.inc

File

./homebox.admin.inc, line 335
Homebox admin file, takes care admin interface for homebox

Code

function homebox_admin_form_to_page(&$page, $form_state) {
  $page->settings['title'] = $form_state['values']['title'];
  $page->settings['path'] = $form_state['values']['path'];
  $page->settings['menu'] = (int) $form_state['values']['menu'];
  $page->settings['enabled'] = (int) $form_state['values']['enabled'];
  $page->settings['auto_save'] = (int) $form_state['values']['auto_save'];
  $page->settings['full'] = (int) $form_state['values']['full'];
  $page->settings['roles'] = array();
  foreach ($form_state['values']['roles'] as $role) {
    if ($role) {
      $page->settings['roles'][] = $role;
    }
  }
}