Changeset View
Changeset View
Standalone View
Standalone View
src/view/phui/PHUIListView.php
Show First 20 Lines • Show All 146 Lines • ▼ Show 20 Lines | public function getItem($key) { | ||||
return null; | return null; | ||||
} | } | ||||
public function getItems() { | public function getItems() { | ||||
return $this->items; | return $this->items; | ||||
} | } | ||||
protected function willRender() { | public function willRender() { | ||||
$key_map = array(); | $key_map = array(); | ||||
foreach ($this->items as $item) { | foreach ($this->items as $item) { | ||||
$key = $item->getKey(); | $key = $item->getKey(); | ||||
if ($key !== null) { | if ($key !== null) { | ||||
if (isset($key_map[$key])) { | if (isset($key_map[$key])) { | ||||
throw new Exception( | throw new Exception( | ||||
pht("Menu contains duplicate items with key '%s'!", $key)); | pht("Menu contains duplicate items with key '%s'!", $key)); | ||||
} | } | ||||
Show All 30 Lines |