function commerce_kickstart_example_store_form in Commerce Kickstart 7
Task callback: returns the form allowing the user to add example store content on install.
File
- ./
commerce_kickstart.profile, line 35
Code
function commerce_kickstart_example_store_form() {
drupal_set_title(st('Example store content'));
// Prepare all the options for example content.
$options = array(
'products' => st('Products'),
'product_displays' => st('Product display nodes (if <em>Products</em> is selected)'),
);
$form['example_content'] = array(
'#type' => 'checkboxes',
'#title' => st('Create example content for the following store components:'),
'#description' => st('The example content is not comprehensive but illustrates how the basic components work.'),
'#options' => $options,
'#default_value' => drupal_map_assoc(array_keys($options)),
);
$form['actions'] = array(
'#type' => 'actions',
);
$form['actions']['submit'] = array(
'#type' => 'submit',
'#value' => st('Create and continue'),
'#weight' => 15,
);
return $form;
}