1 block.create.inc DashboardCreateBlock::form(&$form, &$form_state)

Build the settings form for editing this block.

Overrides Block::form

File

core/modules/dashboard/includes/block.create.inc, line 96
Dashboard block providing links to create new content.

Class

DashboardCreateBlock
@file Dashboard block providing links to create new content.

Code

function form(&$form, &$form_state) {
  parent::form($form, $form_state);

  $options = node_type_get_names();
  foreach ($options as $machine_name => $type_label) {
    $options[$machine_name] = check_plain(t($type_label));
  }

  $form['types'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Display links to create content of the following types'),
    '#options' => $options,
    // All types are enabled if types is an empty array.
    '#default_value' => $this->settings['types'] ? $this->settings['types'] : array_keys($options),
  );
}