function filter_admin_format_page

7.x filter.admin.inc filter_admin_format_page($format = NULL)

Page callback: Displays the text format add/edit form.

Parameters

object|null $format: (optional) An object representing a format, with the following properties:

  • format: A machine-readable name representing the ID of the text format to save. If this corresponds to an existing text format, that format will be updated; otherwise, a new format will be created.
  • name: The title of the text format.
  • cache: (optional) An integer indicating whether the text format is cacheable (1) or not (0). Defaults to 1.
  • status: (optional) An integer indicating whether the text format is enabled (1) or not (0). Defaults to 1.
  • weight: (optional) The weight of the text format, which controls its placement in text format lists. If omitted, the weight is set to 0. Defaults to NULL.

Return value

A form array.

See also

filter_menu()

3 string references to 'filter_admin_format_page'
drupal-6.bare.database.php in drupal/modules/simpletest/tests/upgrade/drupal-6.bare.database.php
Bare installation of Drupal 6.17, for test purposes.
drupal-6.filled.database.php in drupal/modules/simpletest/tests/upgrade/drupal-6.filled.database.php
Filled installation of Drupal 6.17, for test purposes.
filter_menu in drupal/modules/filter/filter.module
Implements hook_menu().

File

drupal/modules/filter/filter.admin.inc, line 123
Administrative page callbacks for the Filter module.

Code

function filter_admin_format_page($format = NULL) {
  if (!isset($format->name)) {
    drupal_set_title(t('Add text format'));
    $format = (object) array(
      'format' => NULL,
      'name' => '',
    );
  }
  return drupal_get_form('filter_admin_format_form', $format);
}