Page MenuHomeClusterLabs Projects
Diviner Tech Docs PHUIObjectItemView

final class PHUIObjectItemView
Phorge Technical Documentation (PHUI)

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

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
wild$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
wildRenderable 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<wild>$childrenRenderable children.
Return
list<wild>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 setWorkflow($workflow)
Inherited

This method is not documented.
Parameters
$workflow
Return
wild

public function getWorkflow()
Inherited

This method is not documented.
Return
wild

public function setMustCapture($must_capture)
Inherited

This method is not documented.
Parameters
$must_capture
Return
wild

public function getMustCapture()
Inherited

This method is not documented.
Return
wild

final public function setMetadata($metadata)
Inherited

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

final public function getMetadata()
Inherited

This method is not documented.
Return
wild

final public function setStyle($style)
Inherited

This method is not documented.
Parameters
$style
Return
wild

final public function getStyle()
Inherited

This method is not documented.
Return
wild

final public function addSigil($sigil)
Inherited

This method is not documented.
Parameters
$sigil
Return
wild

final public function getSigils()
Inherited

This method is not documented.
Return
wild

public function addClass($class)
Inherited

This method is not documented.
Parameters
$class
Return
wild

public function getClasses()
Inherited

This method is not documented.
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

protected function getTagName()

This method is not documented.
Return
wild

protected function getTagAttributes()

This method is not documented.
Return
wild

protected function getTagContent()

This method is not documented.
Return
wild

public function setDisabled($disabled)

This method is not documented.
Parameters
$disabled
Return
wild

public function getDisabled()

This method is not documented.
Return
wild

public function addHeadIcon($icon)

This method is not documented.
Parameters
$icon
Return
wild

public function setObjectName($name)

This method is not documented.
Parameters
$name
Return
wild

public function setGrippable($grippable)

This method is not documented.
Parameters
$grippable
Return
wild

public function getGrippable()

This method is not documented.
Return
wild

public function setEffect($effect)

This method is not documented.
Parameters
$effect
Return
wild

public function getEffect()

This method is not documented.
Return
wild

public function setObject($object)

This method is not documented.
Parameters
$object
Return
wild

public function getObject()

This method is not documented.
Return
wild

public function setHref($href)

Set the href attribute

Parameters
string|PhutilURI|null$href$href
Return
self

public function getHref()

Get the href attribute

Return
string|PhutilURI|null

public function setHeader($header)

This method is not documented.
Parameters
$header
Return
wild

public function setSubHead($subhead)

This method is not documented.
Parameters
$subhead
Return
wild

public function setBadge($badge)

This method is not documented.
Parameters
PHUIBadgeMiniView$badge
Return
wild

public function setCountdown($num, $noun)

This method is not documented.
Parameters
$num
$noun
Return
wild

public function setTitleText($title_text)

This method is not documented.
Parameters
$title_text
Return
wild

public function getTitleText()

This method is not documented.
Return
wild

public function getHeader()

This method is not documented.
Return
wild

public function addByline($byline)

This method is not documented.
Parameters
$byline
Return
wild

public function setImageURI($image_uri)

This method is not documented.
Parameters
$image_uri
Return
wild

public function setImageHref($image_href)

Set the image href attribute

Parameters
string|PhutilURI|null$image_href$image_href
Return
self

public function getImageURI()

This method is not documented.
Return
wild

public function setImageIcon($image_icon)

This method is not documented.
Parameters
$image_icon
Return
wild

public function getImageIcon()

This method is not documented.
Return
wild

public function setCoverImage($image)

This method is not documented.
Parameters
$image
Return
wild

public function setDescription($description)

This method is not documented.
Parameters
$description
Return
wild

public function setSelectable($name, $value, $is_selected, $is_forbidden)

This method is not documented.
Parameters
$name
$value
$is_selected
$is_forbidden
Return
wild

public function setClickable($clickable)

This method is not documented.
Parameters
$clickable
Return
wild

public function getClickable()

This method is not documented.
Return
wild

public function setEpoch($epoch)

This method is not documented.
Parameters
$epoch
Return
wild

public function addAction($action)

This method is not documented.
Parameters
PHUIListItemView$action
Return
wild

public function addIcon($icon, $label, $attributes)

This method is not documented.
Parameters
$icon
$label
$attributes
Return
wild

public function newMenuItem()

This method is not documented.
Return
wild

public function newMapView()

This method is not documented.
Return
wild

public function setIcon($icon)

This method has been deprecated, use setImageIcon() instead.

Parameters
$icon
Return
wild

public function setStatusIcon($icon, $label)

This method is not documented.
Parameters
$icon
$label
Return
wild

public function addHandleIcon($handle, $label)

This method is not documented.
Parameters
PhabricatorObjectHandle$handle
$label
Return
wild

public function setBarColor($bar_color)

This method is not documented.
Parameters
$bar_color
Return
wild

public function getBarColor()

This method is not documented.
Return
wild

public function addAttribute($attribute)

This method is not documented.
Parameters
$attribute
Return
wild

public function setSideColumn($column)

This method is not documented.
Parameters
$column
Return
wild

private function renderStatusIcon($icon, $label)

This method is not documented.
Parameters
$icon
$label
Return
wild

private function renderHandleIcon($handle, $label)

This method is not documented.
Parameters
PhabricatorObjectHandle$handle
$label
Return
wild

private static function requireValidHref($href, $variable_name)

Receive a href attribute and check if it has expected values

TODO: Feel free to remove after 2023, if no more new reports arrive.

https://we.phorge.it/T15316

Parameters
mixed$hrefValue to be checked
string$variable_nameHuman reference
Return
wild