Changeset View
Changeset View
Standalone View
Standalone View
src/applications/settings/storage/PhabricatorUserPreferences.php
| Show First 20 Lines • Show All 68 Lines • ▼ Show 20 Lines | final class PhabricatorUserPreferences extends PhabricatorUserDAO { | ||||
| } | } | ||||
| public function unsetPreference($key) { | public function unsetPreference($key) { | ||||
| unset($this->preferences[$key]); | unset($this->preferences[$key]); | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function getPinnedApplications(array $apps, PhabricatorUser $viewer) { | public function getPinnedApplications(array $apps, PhabricatorUser $viewer) { | ||||
| $pref_pinned = PhabricatorUserPreferences::PREFERENCE_APP_PINNED; | $pref_pinned = self::PREFERENCE_APP_PINNED; | ||||
| $pinned = $this->getPreference($pref_pinned); | $pinned = $this->getPreference($pref_pinned); | ||||
| if ($pinned) { | if ($pinned) { | ||||
| return $pinned; | return $pinned; | ||||
| } | } | ||||
| $pref_tiles = PhabricatorUserPreferences::PREFERENCE_APP_TILES; | $pref_tiles = self::PREFERENCE_APP_TILES; | ||||
| $tiles = $this->getPreference($pref_tiles, array()); | $tiles = $this->getPreference($pref_tiles, array()); | ||||
| $full_tile = 'full'; | $full_tile = 'full'; | ||||
| $large = array(); | $large = array(); | ||||
| foreach ($apps as $app) { | foreach ($apps as $app) { | ||||
| $show = $app->isPinnedByDefault($viewer); | $show = $app->isPinnedByDefault($viewer); | ||||
| // TODO: This is legacy stuff, clean it up eventually. This approximately | // TODO: This is legacy stuff, clean it up eventually. This approximately | ||||
| Show All 19 Lines | |||||