function patterns_import_source in Patterns 5
Same name and namespace in other branches
- 6.2 patterns.module \patterns_import_source()
- 6 patterns.module \patterns_import_source()
- 7.2 includes/forms/import.inc \patterns_import_source()
- 7 includes/forms/import.inc \patterns_import_source()
Display the import pattern form
1 string reference to 'patterns_import_source'
- patterns_menu in ./
patterns.module - Implementation of hook_menu().
File
- ./
patterns.module, line 143 - Enables extremely simple adding/removing features to your site with minimal to no configuration
Code
function patterns_import_source() {
$form['xmlname'] = array(
'#type' => 'textfield',
'#title' => t('Pattern Identifier'),
'#description' => t('Machine readable name for the pattern. The actual title should be included in the pattern itself.'),
'#required' => true,
);
$form['xmlsource'] = array(
'#type' => 'textarea',
'#rows' => 15,
'#title' => t('Enter Pattern XML'),
'#description' => t('Imported patterns are not executed until you run them manually. You can leave off the <?xml> tag at the top.'),
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Submit'),
);
$form['#base'] = 'patterns_import';
return $form;
}