protected function buildCustomSearchFields()
 {
     return array(id(new PhabricatorSearchTextField())->setLabel(pht('Name Contains'))->setKey('name')->setDescription(pht('Search for badges by name substring.')), id(new PhabricatorSearchCheckboxesField())->setKey('qualities')->setLabel(pht('Quality'))->setOptions(PhabricatorBadgesQuality::getDropdownQualityMap()), id(new PhabricatorSearchCheckboxesField())->setKey('statuses')->setLabel(pht('Status'))->setOptions(id(new PhabricatorBadgesBadge())->getStatusNameMap()));
 }
 protected function buildCustomEditFields($object)
 {
     return array(id(new PhabricatorTextEditField())->setKey('name')->setLabel(pht('Name'))->setDescription(pht('Badge name.'))->setConduitTypeDescription(pht('New badge name.'))->setTransactionType(PhabricatorBadgesTransaction::TYPE_NAME)->setValue($object->getName()), id(new PhabricatorTextEditField())->setKey('flavor')->setLabel(pht('Flavor text'))->setDescription(pht('Short description of the badge.'))->setConduitTypeDescription(pht('New badge flavor.'))->setValue($object->getFlavor())->setTransactionType(PhabricatorBadgesTransaction::TYPE_FLAVOR), id(new PhabricatorIconSetEditField())->setKey('icon')->setLabel(pht('Icon'))->setIconSet(new PhabricatorBadgesIconSet())->setTransactionType(PhabricatorBadgesTransaction::TYPE_ICON)->setConduitDescription(pht('Change the badge icon.'))->setConduitTypeDescription(pht('New badge icon.'))->setValue($object->getIcon()), id(new PhabricatorSelectEditField())->setKey('quality')->setLabel(pht('Quality'))->setDescription(pht('Color and rarity of the badge.'))->setConduitTypeDescription(pht('New badge quality.'))->setValue($object->getQuality())->setTransactionType(PhabricatorBadgesTransaction::TYPE_QUALITY)->setOptions(PhabricatorBadgesQuality::getDropdownQualityMap()), id(new PhabricatorRemarkupEditField())->setKey('description')->setLabel(pht('Description'))->setDescription(pht('Badge long description.'))->setConduitTypeDescription(pht('New badge description.'))->setTransactionType(PhabricatorBadgesTransaction::TYPE_DESCRIPTION)->setValue($object->getDescription()));
 }