@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Added a method on FieldSpec to get all diff properties

Summary: We need to be able to query for all properties matching a given pattern, as mentioned in D3676

Test Plan: Loaded Phabricator, ensured diff loaded, ensured field using all properties was able to enumerate them.

Reviewers: vrana, epriestley

Reviewed By: vrana

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3679

+16 -6
+16 -6
src/applications/differential/field/specification/DifferentialFieldSpecification.php
··· 894 894 } 895 895 896 896 /** 897 - * Get a property of a diff set by @{method:setManualDiff}. 897 + * Get the list of properties for a diff set by @{method:setManualDiff}. 898 898 * 899 - * @param string Diff property key. 900 - * @return mixed|null Diff property, or null if the property does not have 901 - * a value. 899 + * @return array Array of all Diff properties. 902 900 * @task context 903 901 */ 904 - final public function getDiffProperty($key) { 902 + final public function getDiffProperties() { 905 903 if ($this->diffProperties === null) { 906 904 // This will be set to some (possibly empty) array if we've loaded 907 905 // properties, so null means diff properties aren't available in this 908 906 // context. 909 907 throw new DifferentialFieldDataNotAvailableException($this); 910 908 } 911 - return idx($this->diffProperties, $key); 909 + return $this->diffProperties; 910 + } 911 + 912 + /** 913 + * Get a property of a diff set by @{method:setManualDiff}. 914 + * 915 + * @param string Diff property key. 916 + * @return mixed|null Diff property, or null if the property does not have 917 + * a value. 918 + * @task context 919 + */ 920 + final public function getDiffProperty($key) { 921 + return idx($this->getDiffProperties(), $key); 912 922 } 913 923 914 924 }