You are here

function flag_comment::options_form in Flag 6.2

Same name and namespace in other branches
  1. 5 flag.inc \flag_comment::options_form()
  2. 6 flag.inc \flag_comment::options_form()
  3. 7.3 includes/flag/flag_comment.inc \flag_comment::options_form()
  4. 7.2 flag.inc \flag_comment::options_form()

File

./flag.inc, line 1477
Implements various flags. Uses object oriented style inspired by that of Views 2.

Class

flag_comment
Implements a comment flag.

Code

function options_form(&$form) {
  parent::options_form($form);
  $form['access']['access_author'] = array(
    '#type' => 'radios',
    '#title' => t('Flag access by content authorship'),
    '#options' => array(
      '' => t('No additional restrictions'),
      'comment_own' => t('Users may only flag own comments'),
      'comment_others' => t('Users may only flag comments by others'),
      'node_own' => t('Users may only flag comments of nodes they own'),
      'node_others' => t('Users may only flag comments of nodes by others'),
    ),
    '#default_value' => $this->access_author,
    '#description' => t("Restrict access to this flag based on the user's ownership of the content. Users must also have access to the flag through the role settings."),
  );
  $form['display']['show_on_comment'] = array(
    '#type' => 'checkbox',
    '#title' => t('Display link under comment'),
    '#default_value' => $this->show_on_comment,
    '#access' => empty($this->locked['show_on_comment']),
  );
}