function patterns_editor_create_page in Patterns 7
Same name and namespace in other branches
- 7.2 includes/forms/editor.inc \patterns_editor_create_page()
Display the page for creating a new pattern.
1 string reference to 'patterns_editor_create_page'
- patterns_menu in ./
patterns.module - Implements hook_menu().
File
- includes/
forms/ editor.inc, line 11 - Functions, forms related to the Patterns editor.
Code
function patterns_editor_create_page($pid = NULL) {
$info = array();
$pattern = array();
if (is_numeric($pid)) {
$pattern = patterns_get_pattern($pid);
if ($pattern->content) {
$info['Title'][] = t('Title:');
$info['Title'][] = $pattern->title;
$info['Path'][] = t('Path:');
$info['Path'][] = $pattern->file;
}
}
$out = '<h6>Info</h6>';
$out .= theme('table', array(
'rows' => $info,
'attributes' => array(
'class' => 'patterns-list',
),
));
$out .= patterns_editor('patterns_edit', $pattern);
return $out;
}