Changeset View
Changeset View
Standalone View
Standalone View
src/applications/project/herald/HeraldProjectsField.php
- This file was copied to src/applications/project/herald/PhabricatorProjectTagsField.php.
| <?php | <?php | ||||
| final class HeraldProjectsField extends HeraldField { | final class HeraldProjectsField | ||||
| extends PhabricatorProjectTagsField { | |||||
| const FIELDCONST = 'projects'; | const FIELDCONST = 'projects'; | ||||
| public function getHeraldFieldName() { | public function getHeraldFieldName() { | ||||
| return pht('Project tags'); | return pht('Project tags'); | ||||
| } | } | ||||
| public function getFieldGroupKey() { | |||||
| return HeraldSupportFieldGroup::FIELDGROUPKEY; | |||||
| } | |||||
| public function supportsObject($object) { | |||||
| return ($object instanceof PhabricatorProjectInterface); | |||||
| } | |||||
| public function getHeraldFieldValue($object) { | public function getHeraldFieldValue($object) { | ||||
| return PhabricatorEdgeQuery::loadDestinationPHIDs( | return PhabricatorEdgeQuery::loadDestinationPHIDs( | ||||
| $object->getPHID(), | $object->getPHID(), | ||||
| PhabricatorProjectObjectHasProjectEdgeType::EDGECONST); | PhabricatorProjectObjectHasProjectEdgeType::EDGECONST); | ||||
| } | } | ||||
| protected function getHeraldFieldStandardType() { | |||||
| return self::STANDARD_PHID_LIST; | |||||
| } | |||||
| protected function getDatasource() { | |||||
| return new PhabricatorProjectDatasource(); | |||||
| } | |||||
| } | } | ||||