You are here

function _icon_selector_element_info in Icon API 7

Same name and namespace in other branches
  1. 8 icon.api.php \_icon_selector_element_info()

Implements the icon_selector input element.

The icon_selector sets a tree state of TRUE, values will be inside the element's value tree as "bundle" and "icon".

string #type The type of element to render, must be: icon_selector. string #title Optional, the title of the fieldset. Default, "Icon". boolean #collapsible Optional, determine whether the fieldset is collapsible. Default, TRUE. boolean #collapsed Optional, determine whether the fieldset should initialize in a collapsed state. Default, FALSE. string #default_bundle Optional, machine name of the default bundle to initialize with. string #default_icon Optional, machine name of the default icon to initialize with.

See also

icon_block_form_alter()

icon_block_form_submit()

File

./icon.api.php, line 366
icon.api.php Hooks and form elements provided by the Icon API module.

Code

function _icon_selector_element_info() {
  return array(
    '#type' => 'icon_selector',
    '#title' => t('Icon'),
    '#collapsible' => TRUE,
    '#collapsed' => FALSE,
    '#default_bundle' => '',
    '#default_icon' => '',
  );
}