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.
- public function render()
- public function producePhutilSafeHTML()
- public function setPageSize($page_size)
- public function setOffset($offset)
- public function getOffset()
- public function getPageSize()
- public function setCount($count)
- public function setHasMorePages($has_more)
- public function setURI($uri, $paging_parameter)
- public function readFromRequest($request)
- public function willShowPagingControls()
- public function getHasMorePages()
- public function setSurroundingPages($pages)
- private function computeCount()
- private function isExactCountKnown()
- public function sliceResults($results) — A common paging strategy is to select one extra record and use that to indicate that there's an additional page (this doesn't give you a complete page count but is often faster than counting the total number of items). This method will take a result array, slice it down to the page size if necessary, and call setHasMorePages() if there are more than one page of results.
- public function setEnableKeyboardShortcuts($enable)
- private function getDisplayIndex($page_index)
config
1
- final protected function renderChildren() — Produce children for rendering.