Managing Children
- protected function canAppendChild() — Test if this View accepts children.
- final public function hasChildren() — Test if an element has no children.
- private function reduceChildren($children) — Reduce effectively-empty lists of children to be actually empty. This recursively removes `null`, `''`, and `array()` from the list of children so that @{method:hasChildren} can more effectively align with expectations.
Other Methods
- public function setViewer($viewer) — Set the user viewing this element.
- public function getViewer() — Get the user viewing this element.
- public function hasViewer() — Test if a viewer has been set on this element.
- final public function appendChild($child) — Append a child to the list of children.
- public function getDefaultResourceSource()
- public function requireResource($symbol)
- public function initBehavior($name, $config)
- public function willRender() — Inconsistent, unreliable pre-rendering hook.
- final public function render()
- public function producePhutilSafeHTML()
- public function setHidden($hidden)
- public function setID($id)
- public function getID()
- public function setControlID($control_id)
- public function getControlID()
- public function setControlStyle($control_style)
- public function getControlStyle()
- public function setLabel($label)
- public function setAriaLabel($aria_label) — Explicitly set an aria-label attribute for accessibility. Only to be used when no visible label is already set via setLabel().
- public function getAriaLabel()
- public function getLabel()
- public function setCaption($caption) — Set the Caption The Caption shows a tip usually nearby the related input field.
- public function getCaption() — Get the Caption The Caption shows a tip usually nearby the related input field.
- public function setError($error)
- public function getError()
- public function setName($name)
- public function getName()
- public function setValue($value)
- public function getHasCopyButton() — Whether a button is displayed next to the control which allows the user to copy the value in the form control. Common use cases include <input> (AphrontFormTextControl) and <textarea> (AphrontFormTextAreaControl) elements displaying read-only data such as tokens or passphrases. This is only to get the CSS right; actual button implementation is in subclasses.
- public function setHasCopyButton($has_copy_button) — Whether to display a button next to the control which allows the user to copy the value in the form control. Common use cases include <input> (AphrontFormTextControl) and <textarea> (AphrontFormTextAreaControl) elements displaying read-only data such as tokens or passphrases. This is only to get the CSS right; actual button implementation is in subclasses.
- public function getValue()
- public function isValid()
- public function isRequired()
- public function isEmpty()
- public function getSerializedValue()
- public function readSerializedValue($value)
- public function readValueFromRequest($request)
- public function readValueFromDictionary($dictionary)
- public function setDisabled($disabled)
- public function getDisabled()
- protected function renderInput()
- protected function getCustomControlClass()
- protected function shouldRender()
- public function addClass($class)
- public function setDisableAutocomplete($disable_autocomplete)
config
1
- final protected function renderChildren() — Produce children for rendering.