Add in some basic defaults, Tasks, Projects, Repositories... anything else? Also switches "manage" context if you are an admin or user. Hides link if you are not logged in.
Details
Details
- Reviewers
epriestley - Commits
- rP452f5bce18e5: Make some defaults for Quick Create / Favorites
Review Global/Personal in Favorites app, click on each link.
Diff Detail
Diff Detail
- Repository
- rP Phabricator
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
src/applications/favorites/engine/PhabricatorFavoritesProfileMenuEngine.php | ||
---|---|---|
29 | Can we use constants for these? e.g. ManiphestEditEngine::whatever? Maybe with a static function on EditEngine to add the "/" in the middle? |
Comment Actions
The fully static version would be:
PhabricatorEditEngine::generateFullKeyForFormFromTheseConstants( ManiphestTaskEditEngine::ENGINEKEY, PhabricatorEditEngine::EDITENGINECONFIG_DEFUAULT);
But I think your version is cleaner.
You can technically do your version as a static method, like this:
public static function generateFullFormKey() { return static::ENGINEKEY.'/'.self::EDITENGINECONFIG_DEFAULT; }
...using static instead of self, but this is a feature called "Late Static Binding" which was not introduced until PHP 5.3, so we can't currently use it in this codebase.