public function hostingService::form in Hosting 6.2
Same name and namespace in other branches
- 7.4 server/hosting_server.service.inc \hostingService::form()
- 7.3 server/hosting_server.service.inc \hostingService::form()
6 calls to hostingService::form()
- hostingService_db_mysql::form in db_server/
hosting_db_server.service.inc - hostingService_dns_master::form in dns/
hosting_dns.service.inc - hostingService_example_basic::form in example/
hosting_example.service.inc - Extend the server node form.
- hostingService_http_cluster::form in web_cluster/
hosting_web_cluster.service.inc - hostingService_http_pack::form in web_pack/
hosting_web_pack.service.inc
6 methods override hostingService::form()
- hostingService_db_mysql::form in db_server/
hosting_db_server.service.inc - hostingService_dns_master::form in dns/
hosting_dns.service.inc - hostingService_example_basic::form in example/
hosting_example.service.inc - Extend the server node form.
- hostingService_http_cluster::form in web_cluster/
hosting_web_cluster.service.inc - hostingService_http_pack::form in web_pack/
hosting_web_pack.service.inc
File
- server/
hosting_server.service.inc, line 73
Class
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',
);
}
}