Page MenuHomePhabricator

Restrict ProfileMenuItem by location
Closed, InvalidPublic

Description

I think there is some merit to allowing ProfileMenuItems define which locations they can be installed at. This opens up building Home Only type modules (like Motivator) or if we build MagicProjectGlobalDashpanel, to projects.

Event Timeline

You should be able to implement canAddToObject() to do this. If you want a Home-only item, implement it like this:

public function canAddToObject($object) {
  return ($object instanceof PhabricatorHomeApplication);
}