Page MenuHomeMTRNord's Forge
Diviner Tech Docs PHUIFormFileControl

final class PHUIFormFileControl
Phorge Technical Documentation ()

This class is not documented.

Tasks

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 setAllowMultiple($allow_multiple)
  • public function getAllowMultiple()

config

  • public function setUser($user) — Deprecated, use @{method:setViewer}.
  • protected function getUser() — Deprecated, use @{method:getViewer}.

1

  • final protected function renderChildren() — Produce children for rendering.

Methods

public function setViewer($viewer)
Inherited

AphrontView

Set the user viewing this element.

Parameters
PhabricatorUser$viewerViewing user.
Return
$this

public function getViewer()
Inherited

AphrontView

Get the user viewing this element.

Throws an exception if no viewer has been set.

Return
PhabricatorUserViewing user.

public function hasViewer()
Inherited

AphrontView

Test if a viewer has been set on this element.

Return
boolTrue if a viewer is available.

public function setUser($user)
Inherited

AphrontView

Deprecated, use setViewer().

Parameters
\PhabricatorUser$user
Return
wild

protected function getUser()
Inherited

AphrontView

Deprecated, use getViewer().

Return
wild

protected function canAppendChild()
Inherited

AphrontView

Test if this View accepts children.

By default, views accept children, but subclases may override this method to prevent children from being appended. Doing so will cause appendChild() to throw exceptions instead of appending children.

Return
boolTrue if the View should accept children.

final public function appendChild($child)
Inherited

AphrontView

Append a child to the list of children.

This method will only work if the view supports children, which is determined by canAppendChild().

Parameters
mixed$childSomething renderable.
Return
$this

final protected function renderChildren()
Inherited

AphrontView

Produce children for rendering.

Historically, this method reduced children to a string representation, but it no longer does.

Return
mixedRenderable children.

final public function hasChildren()
Inherited

AphrontView

Test if an element has no children.

Return
boolTrue if this element has children.

private function reduceChildren($children)
Inherited

AphrontView

Reduce effectively-empty lists of children to be actually empty. This recursively removes null, '', and array() from the list of children so that hasChildren() can more effectively align with expectations.

NOTE: Because View children are not rendered, a View which renders down to nothing will not be reduced by this method.
Parameters
list<mixed>$childrenRenderable children.
Return
list<mixed>Reduced list of children.

public function getDefaultResourceSource()
Inherited

This method is not documented.
Return
wild

public function requireResource($symbol)
Inherited

This method is not documented.
Parameters
$symbol
Return
wild

public function initBehavior($name, $config)
Inherited

This method is not documented.
Parameters
$name
$config
Return
wild

public function willRender()
Inherited

AphrontView

Inconsistent, unreliable pre-rendering hook.

This hook may fire before views render. It is not fired reliably, and may fire multiple times.

If it does fire, views might use it to register data for later loads, but almost no datasources support this now; this is currently only useful for tokenizers. This mechanism might eventually see wider support or might be removed.

Return
wild

final public function render()
Inherited

This method is not documented.
Return
wild

public function producePhutilSafeHTML()
Inherited

This method is not documented.
Return
wild

public function setHidden($hidden)
Inherited

This method is not documented.
Parameters
$hidden
Return
wild

public function setID($id)
Inherited

This method is not documented.
Parameters
$id
Return
wild

public function getID()
Inherited

This method is not documented.
Return
wild

public function setControlID($control_id)
Inherited

This method is not documented.
Parameters
$control_id
Return
wild

public function getControlID()
Inherited

This method is not documented.
Return
wild

public function setControlStyle($control_style)
Inherited

This method is not documented.
Parameters
$control_style
Return
wild

public function getControlStyle()
Inherited

This method is not documented.
Return
wild

public function setLabel($label)
Inherited

This method is not documented.
Parameters
$label
Return
wild

public function setAriaLabel($aria_label)
Inherited

AphrontFormControl

Explicitly set an aria-label attribute for accessibility. Only to be used when no visible label is already set via setLabel().

Parameters
string$aria_labelaria-label text to add to the form control
Return
wild

public function getAriaLabel()
Inherited

This method is not documented.
Return
wild

public function getLabel()
Inherited

This method is not documented.
Return
wild

public function setCaption($caption)
Inherited

AphrontFormControl

Set the Caption The Caption shows a tip usually nearby the related input field.

Parameters
string|PhutilSafeHTML|null$caption$caption
Return
self

public function getCaption()
Inherited

AphrontFormControl

Get the Caption The Caption shows a tip usually nearby the related input field.

Return
string|PhutilSafeHTML|null

public function setError($error)
Inherited

This method is not documented.
Parameters
$error
Return
wild

public function getError()
Inherited

This method is not documented.
Return
wild

public function setName($name)
Inherited

This method is not documented.
Parameters
$name
Return
wild

public function getName()
Inherited

This method is not documented.
Return
wild

public function setValue($value)
Inherited

This method is not documented.
Parameters
$value
Return
wild

public function getHasCopyButton()
Inherited

AphrontFormControl

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.

Return
bool

public function setHasCopyButton($has_copy_button)
Inherited

AphrontFormControl

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.

Parameters
bool$has_copy_button$has_copy_button
Return
wild

public function getValue()
Inherited

This method is not documented.
Return
wild

public function isValid()
Inherited

This method is not documented.
Return
wild

public function isRequired()
Inherited

This method is not documented.
Return
wild

public function isEmpty()
Inherited

This method is not documented.
Return
wild

public function getSerializedValue()
Inherited

This method is not documented.
Return
wild

public function readSerializedValue($value)
Inherited

This method is not documented.
Parameters
$value
Return
wild

public function readValueFromRequest($request)
Inherited

This method is not documented.
Parameters
\AphrontRequest$request
Return
wild

public function readValueFromDictionary($dictionary)
Inherited

This method is not documented.
Parameters
array$dictionary
Return
wild

public function setDisabled($disabled)
Inherited

This method is not documented.
Parameters
$disabled
Return
wild

public function getDisabled()
Inherited

This method is not documented.
Return
wild

protected function renderInput()

This method is not documented.
Return
wild

protected function getCustomControlClass()

This method is not documented.
Return
wild

protected function shouldRender()
Inherited

This method is not documented.
Return
wild

public function addClass($class)
Inherited

This method is not documented.
Parameters
$class
Return
wild

public function setAllowMultiple($allow_multiple)

This method is not documented.
Parameters
$allow_multiple
Return
wild

public function getAllowMultiple()

This method is not documented.
Return
wild