Differential D17160 Diff 41290 src/applications/search/storage/PhabricatorProfileMenuItemConfiguration.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/search/storage/PhabricatorProfileMenuItemConfiguration.php
Show All 26 Lines | public function getTableName() { | ||||
return 'search_profilepanelconfiguration'; | return 'search_profilepanelconfiguration'; | ||||
} | } | ||||
public static function initializeNewBuiltin() { | public static function initializeNewBuiltin() { | ||||
return id(new self()) | return id(new self()) | ||||
->setVisibility(self::VISIBILITY_VISIBLE); | ->setVisibility(self::VISIBILITY_VISIBLE); | ||||
} | } | ||||
public static function initializeNewItem( | public static function initializeNewItem( | ||||
$profile_object, | $profile_object, | ||||
PhabricatorProfileMenuItem $item) { | PhabricatorProfileMenuItem $item, | ||||
$custom_phid) { | |||||
return self::initializeNewBuiltin() | return self::initializeNewBuiltin() | ||||
->setProfilePHID($profile_object->getPHID()) | ->setProfilePHID($profile_object->getPHID()) | ||||
->setMenuItemKey($item->getMenuItemKey()) | ->setMenuItemKey($item->getMenuItemKey()) | ||||
->attachMenuItem($item) | ->attachMenuItem($item) | ||||
->attachProfileObject($profile_object); | ->attachProfileObject($profile_object) | ||||
->setCustomPHID($custom_phid); | |||||
} | } | ||||
chad: @epriestley is this correct way? it works, and I think I understand why. | |||||
protected function getConfiguration() { | protected function getConfiguration() { | ||||
return array( | return array( | ||||
self::CONFIG_AUX_PHID => true, | self::CONFIG_AUX_PHID => true, | ||||
self::CONFIG_SERIALIZATION => array( | self::CONFIG_SERIALIZATION => array( | ||||
'menuItemProperties' => self::SERIALIZATION_JSON, | 'menuItemProperties' => self::SERIALIZATION_JSON, | ||||
), | ), | ||||
self::CONFIG_COLUMN_SCHEMA => array( | self::CONFIG_COLUMN_SCHEMA => array( | ||||
▲ Show 20 Lines • Show All 159 Lines • Show Last 20 Lines |
@epriestley is this correct way? it works, and I think I understand why.