Page MenuHomeGitPull.it
Diviner Tech Docs PHUIHeaderView

final class PHUIHeaderView
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

  • 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.

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 subclasses 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 setWorkflow($workflow)
Inherited

This method is not documented.
Parameters
bool$workflow$workflow
Return
$this

public function getWorkflow()
Inherited

This method is not documented.
Return
bool

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()

Get the HTML tag

Return
string

protected function getTagAttributes()

This method is not documented.
Return
wild

protected function getTagContent()

This method is not documented.
Return
wild

public function setHeader($header)

This method is not documented.
Parameters
$header
Return
wild

public function setTall($tall)

This method is not documented.
Parameters
$tall
Return
wild

public function addTag($tag)

This method is not documented.
Parameters
\PHUITagView$tag
Return
wild

public function setImage($uri)

Set a header image.

Parameters
$uri
Return
wild

public function setImageURL($url)

Make the header image link to an URL. Only useful in combination with setImage().

Parameters
$url
Return
wild

public function setImageEditURL($url)

Make the header image link to an URL and show an "Edit" text on hovering. Only useful in combination with setImage().

Parameters
$url
Return
wild

public function setSubheader($subheader)

This method is not documented.
Parameters
$subheader
Return
wild

public function setProfileHeader($bighead)

This method is not documented.
Parameters
$bighead
Return
wild

public function setHeaderIcon($icon)

This method is not documented.
Parameters
$icon
Return
wild

public function setActionList($list)

This method is not documented.
Parameters
\PhabricatorActionListView$list
Return
wild

public function setActionListID($action_list_id)

This method is not documented.
Parameters
$action_list_id
Return
wild

public function setCollapsible($collapsible)

Render PHUIHeaderView as a <summary> instead of a <div> HTML tag. To be used for collapse/expand in combination with PHUIBoxView.

Parameters
bool$collapsibleTrue to wrap in <summary> instead of <div> HTML tag.
Return
wild

public function setPolicyObject($object)

This method is not documented.
Parameters
\PhabricatorPolicyInterface$object
Return
wild

public function addProperty($property, $value)

This method is not documented.
Parameters
$property
$value
Return
wild

public function addActionLink($button)

This method is not documented.
Parameters
\PHUIButtonView$button
Return
wild

public function addActionItem($action)

This method is not documented.
Parameters
$action
Return
wild

public function setButtonBar($bb)

This method is not documented.
Parameters
\PHUIButtonBarView$bb
Return
wild

public function setStatus($icon, $color, $name)

Render a tag (PHUITagView) in this header

Parameters
string$iconIcon in the tag
string|null$colorTag color
string$nameText displayed in the tag
Return
$this

public function setEpoch($epoch)

Add a PHUITagView to this header showing "Updated..." with a timestamp

Parameters
int$epochEpoch value of current timestamp
Return
$this

public function setHref($href)

This method is not documented.
Parameters
$href
Return
wild

public function getHref()

This method is not documented.
Return
wild

private function renderPolicyProperty($object)

Render a tag in this header describing the object policy

Parameters
\PhabricatorPolicyInterface$object
Return
string|nullHTML markup which renders a tag, or null