You are here

public function hostingService::form in Hostmaster (Aegir) 6

6 calls to hostingService::form()
hostingService_db_mysql::form in modules/hosting/db_server/hosting_db_server.service.inc
hostingService_dns_master::form in modules/hosting/dns/hosting_dns.service.inc
hostingService_example_basic::form in modules/hosting/example/hosting_example.service.inc
Extend the server node form.
hostingService_http_cluster::form in modules/hosting/web_cluster/hosting_web_cluster.service.inc
hostingService_http_pack::form in modules/hosting/web_pack/hosting_web_pack.service.inc

... See full list

6 methods override hostingService::form()
hostingService_db_mysql::form in modules/hosting/db_server/hosting_db_server.service.inc
hostingService_dns_master::form in modules/hosting/dns/hosting_dns.service.inc
hostingService_example_basic::form in modules/hosting/example/hosting_example.service.inc
Extend the server node form.
hostingService_http_cluster::form in modules/hosting/web_cluster/hosting_web_cluster.service.inc
hostingService_http_pack::form in modules/hosting/web_pack/hosting_web_pack.service.inc

... See full list

File

modules/hosting/server/hosting_server.service.inc, line 73

Class

hostingService

Code

public function form(&$form) {
  if ($this->has_restart_cmd) {
    $form['restart_cmd'] = array(
      '#type' => 'textfield',
      '#title' => t('Restart command'),
      '#required' => $this->available,
      '#description' => t('The command to run to restart this service.'),
      '#default_value' => !is_null($this->restart_cmd) ? $this->restart_cmd : $this
        ->default_restart_cmd(),
      '#size' => 40,
      '#maxlength' => 255,
      '#weight' => -7,
    );
  }
  else {
    $form['restart_cmd'] = array(
      '#type' => 'value',
      '#value' => null,
    );
  }
  if ($this->has_port) {
    $form['port'] = array(
      '#type' => 'textfield',
      '#title' => t('Port'),
      '#required' => $this->available,
      '#size' => 40,
      '#default_value' => $this->port ? $this->port : $this
        ->default_port(),
      '#description' => t("The port that this service is listening on."),
      '#maxlength' => 255,
      '#weight' => -8,
    );
  }
  else {
    $form['port'] = array(
      '#type' => 'value',
      '#value' => '0',
    );
  }
}