You are here

function hostingService_db_mysql::form in Hosting 7.4

Same name and namespace in other branches
  1. 6.2 db_server/hosting_db_server.service.inc \hostingService_db_mysql::form()
  2. 7.3 db_server/hosting_db_server.service.inc \hostingService_db_mysql::form()

Overrides hostingService::form

File

db_server/hosting_db_server.service.inc, line 26
Provide the hosting serivce classes for database integration.

Class

hostingService_db_mysql
A MySQL specific db service implementation class.

Code

function form(&$form) {
  parent::form($form);
  $form['db_user'] = array(
    '#type' => 'textfield',
    '#required' => !empty($this->available),
    '#title' => t('Username'),
    '#description' => t('The user that will be used to create new mysql users and databases for new sites.'),
    '#size' => 40,
    '#default_value' => isset($this->db_user) ? $this->db_user : NULL,
    '#maxlength' => 64,
    '#weight' => 5,
  );
  $passwd_description = '';
  if (isset($this->db_passwd)) {
    $passwd_description = t('<strong>You have already set a password for this database server.</strong><br />');
  }
  $form['db_passwd'] = array(
    '#type' => 'password_confirm',
    '#required' => FALSE,
    '#description' => $passwd_description . t('The password for the user that will be used to create new mysql users and databases for new sites'),
    '#size' => 30,
    '#weight' => 10,
  );
}