Path: blob/master/src/view/form/control/AphrontFormTextControl.php
12262 views
<?php12final class AphrontFormTextControl extends AphrontFormControl {34private $disableAutocomplete;5private $sigil;6private $placeholder;7private $autofocus;89public function setDisableAutocomplete($disable) {10$this->disableAutocomplete = $disable;11return $this;12}1314private function getDisableAutocomplete() {15return $this->disableAutocomplete;16}1718public function getPlaceholder() {19return $this->placeholder;20}2122public function setPlaceholder($placeholder) {23$this->placeholder = $placeholder;24return $this;25}2627public function setAutofocus($autofocus) {28$this->autofocus = $autofocus;29return $this;30}3132public function getAutofocus() {33return $this->autofocus;34}3536public function getSigil() {37return $this->sigil;38}3940public function setSigil($sigil) {41$this->sigil = $sigil;42return $this;43}4445protected function getCustomControlClass() {46return 'aphront-form-control-text';47}4849protected function renderInput() {50return javelin_tag(51'input',52array(53'type' => 'text',54'name' => $this->getName(),55'value' => $this->getValue(),56'disabled' => $this->getDisabled() ? 'disabled' : null,57'autocomplete' => $this->getDisableAutocomplete() ? 'off' : null,58'id' => $this->getID(),59'sigil' => $this->getSigil(),60'placeholder' => $this->getPlaceholder(),61'autofocus' => ($this->getAutofocus() ? 'autofocus' : null),62));63}6465}666768