function shortcut_link_add

Form callback: builds the form for adding a new shortcut link.

Parameters

$form: An associative array containing the structure of the form.

$form_state: An associative array containing the current state of the form.

$shortcut_set: An object representing the shortcut set to which the link will be added.

Return value

An array representing the form definition.

See also

shortcut_link_edit_validate()

shortcut_link_add_submit()

Related topics

1 string reference to 'shortcut_link_add'
shortcut_menu in modules/shortcut/shortcut.module
Implements hook_menu().

File

modules/shortcut/shortcut.admin.inc, line 419

Code

function shortcut_link_add($form, &$form_state, $shortcut_set) {
    drupal_set_title(t('Add new shortcut'));
    $form['shortcut_set'] = array(
        '#type' => 'value',
        '#value' => $shortcut_set,
    );
    $form += _shortcut_link_form_elements();
    return $form;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.