public function HostingDeployForm::alter in Aegir Deploy 7.3
File
- includes/
HostingDeployForm.inc, line 15 - The HostingDeployForm class.
Class
- HostingDeployForm
- @file The HostingDeployForm class.
Code
public function alter() {
$this
->makeFieldsetsIntoRadios('field_deployment_strategy', $this
->getStrategyLabels());
$this
->addDefaultStrategyOption();
$this
->setStrategy();
$readonly = isset($this->node->platform_status) && $this->node->platform_status != HOSTING_PLATFORM_QUEUED && !empty($this->node->field_deployment_strategy);
if ($readonly) {
$this
->makeFieldReadOnly('field_deployment_strategy');
}
$this
->addGitHelp();
// TODO: Add a validator to ensure required fields for a given strategy are
// provided. Add a submit handler to clear out values from other
// strategies' fields?
}