You are here

public static function RocketChat::renderAdminPage in Rocket.Chat 7

Same name and namespace in other branches
  1. 7.2 src/RocketChat.class.inc \RocketChat\RocketChat::renderAdminPage()

Renders the Admin page.

Return value

array The Structured Drupal Render Array for this Admin page.

1 call to RocketChat::renderAdminPage()
rocket_chat_admin_page in ./rocket_chat.module
Admin Page Render.

File

./RocketChat.class.inc, line 91

Class

RocketChat
Class RocketChat.

Namespace

RocketChat

Code

public static function renderAdminPage() {
  $form['rocket_chat_url'] = array(
    '#type' => 'textfield',
    '#title' => t('Rocket.Chat Server'),
    '#default_value' => variable_get('rocket_chat_url', "http://localhost"),
    '#size' => 64,
    '#maxlength' => 128,
    '#description' => t("The URL of the Rocket.Chat server."),
    '#required' => TRUE,
  );
  $form['rocket_chat_route'] = array(
    '#type' => 'textarea',
    '#title' => t('Paths to show the chat widget on.'),
    '#default_value' => variable_get('rocket_chat_route', ""),
    '#cols' => 20,
    '#rows' => 15,
    '#description' => t("use '<front>' to signify the front page. clear this field to make it show on all pages."),
    '#required' => FALSE,
  );
  return system_settings_form($form);
}