Changeset View
Changeset View
Standalone View
Standalone View
src/view/form/control/AphrontFormTextControl.php
<?php | <?php | ||||
final class AphrontFormTextControl extends AphrontFormControl { | final class AphrontFormTextControl extends AphrontFormControl { | ||||
private $disableAutocomplete; | private $disableAutocomplete; | ||||
private $sigil; | private $sigil; | ||||
private $placeholder; | private $placeholder; | ||||
private $autofocus; | |||||
public function setDisableAutocomplete($disable) { | public function setDisableAutocomplete($disable) { | ||||
$this->disableAutocomplete = $disable; | $this->disableAutocomplete = $disable; | ||||
return $this; | return $this; | ||||
} | } | ||||
private function getDisableAutocomplete() { | private function getDisableAutocomplete() { | ||||
return $this->disableAutocomplete; | return $this->disableAutocomplete; | ||||
} | } | ||||
public function getPlaceholder() { | public function getPlaceholder() { | ||||
return $this->placeholder; | return $this->placeholder; | ||||
} | } | ||||
public function setPlaceholder($placeholder) { | public function setPlaceholder($placeholder) { | ||||
$this->placeholder = $placeholder; | $this->placeholder = $placeholder; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function setAutofocus($autofocus) { | |||||
$this->autofocus = $autofocus; | |||||
return $this; | |||||
} | |||||
public function getAutofocus() { | |||||
return $this->autofocus; | |||||
} | |||||
public function getSigil() { | public function getSigil() { | ||||
return $this->sigil; | return $this->sigil; | ||||
} | } | ||||
public function setSigil($sigil) { | public function setSigil($sigil) { | ||||
$this->sigil = $sigil; | $this->sigil = $sigil; | ||||
return $this; | return $this; | ||||
} | } | ||||
Show All 9 Lines | return javelin_tag( | ||||
'type' => 'text', | 'type' => 'text', | ||||
'name' => $this->getName(), | 'name' => $this->getName(), | ||||
'value' => $this->getValue(), | 'value' => $this->getValue(), | ||||
'disabled' => $this->getDisabled() ? 'disabled' : null, | 'disabled' => $this->getDisabled() ? 'disabled' : null, | ||||
'autocomplete' => $this->getDisableAutocomplete() ? 'off' : null, | 'autocomplete' => $this->getDisableAutocomplete() ? 'off' : null, | ||||
'id' => $this->getID(), | 'id' => $this->getID(), | ||||
'sigil' => $this->getSigil(), | 'sigil' => $this->getSigil(), | ||||
'placeholder' => $this->getPlaceholder(), | 'placeholder' => $this->getPlaceholder(), | ||||
'autofocus' => ($this->getAutofocus() ? 'autofocus' : null), | |||||
)); | )); | ||||
} | } | ||||
} | } |