function custom_formatters_engine_php_settings_form in Custom Formatters 7.2
Settings form callback for Custom Formatters PHP engine.
Parameters
array $form: The form api array.
1 string reference to 'custom_formatters_engine_php_settings_form'
- custom_formatters_custom_formatters_engine_info in includes/
custom_formatters.inc - Implements hook_custom_formatters_engine().
File
- engines/
php.inc, line 31 - PHP engine for Custom Formatters modules.
Code
function custom_formatters_engine_php_settings_form(&$form) {
$form['field_types']['#multiple'] = TRUE;
$form['code']['#description'] = t('Enter the PHP code that will be evaluated. You should NOT include %php tags. The $variables object is available.', array(
'%php' => '<?php ?>',
));
$form['code']['#attributes']['class'][] = 'syntax-php';
$form['settings'] = array(
'#type' => 'container',
);
// Additional debugging modes.
$form['preview']['options']['dpm'] = array(
'#type' => 'container',
);
$form['preview']['options']['dpm']['vars'] = array(
'#type' => 'checkbox',
'#title' => t('Output <strong>$variables</strong> array (requires <a href="http://drupal.org/project/devel">Devel</a> module).'),
'#default_value' => module_exists('devel'),
'#disabled' => !module_exists('devel'),
);
$form['preview']['options']['dpm']['html'] = array(
'#type' => 'checkbox',
'#title' => t('Output raw HTML (requires <a href="http://drupal.org/project/devel">Devel</a> module).'),
'#default_value' => module_exists('devel'),
'#disabled' => !module_exists('devel'),
);
}