Changeset View
Changeset View
Standalone View
Standalone View
src/applications/search/menuitem/PhabricatorProfileMenuItem.php
<?php | <?php | ||||
abstract class PhabricatorProfileMenuItem extends Phobject { | abstract class PhabricatorProfileMenuItem extends Phobject { | ||||
private $viewer; | private $viewer; | ||||
private $engine; | private $engine; | ||||
public function getMenuItemTypeIcon() { | public function getMenuItemTypeIcon() { | ||||
return null; | return null; | ||||
} | } | ||||
abstract public function getMenuItemTypeName(); | abstract public function getMenuItemTypeName(); | ||||
abstract public function getDisplayName( | abstract public function getDisplayName( | ||||
PhabricatorProfileMenuItemConfiguration $config); | PhabricatorProfileMenuItemConfiguration $config); | ||||
▲ Show 20 Lines • Show All 64 Lines • ▼ Show 20 Lines | if (!is_array($list)) { | ||||
throw new Exception( | throw new Exception( | ||||
pht( | pht( | ||||
'Expected "newMenuItemViewList()" to return a list (in class "%s"), '. | 'Expected "newMenuItemViewList()" to return a list (in class "%s"), '. | ||||
'but it returned something else ("%s").', | 'but it returned something else ("%s").', | ||||
get_class($this), | get_class($this), | ||||
phutil_describe_type($list))); | phutil_describe_type($list))); | ||||
} | } | ||||
try { | |||||
assert_instances_of($list, 'PhabricatorProfileMenuItemView'); | assert_instances_of($list, 'PhabricatorProfileMenuItemView'); | ||||
} catch (Exception $ex) { | |||||
var_dump(get_class($this)); | |||||
var_dump($list); | |||||
amckinley: Debugging code. | |||||
} | |||||
foreach ($list as $view) { | foreach ($list as $view) { | ||||
$view->setMenuItemConfiguration($config); | $view->setMenuItemConfiguration($config); | ||||
} | } | ||||
return $list; | return $list; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 66 Lines • Show Last 20 Lines |
Debugging code.