Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/customfield/field/PhabricatorCustomField.php
Show First 20 Lines • Show All 378 Lines • ▼ Show 20 Lines | /* -( Field Proxies )------------------------------------------------------ */ | ||||
/** | /** | ||||
* Set the proxy implementation for this field. See @{method:canSetProxy} for | * Set the proxy implementation for this field. See @{method:canSetProxy} for | ||||
* discussion of field proxies. | * discussion of field proxies. | ||||
* | * | ||||
* @param PhabricatorCustomField Field implementation. | * @param PhabricatorCustomField Field implementation. | ||||
* @return this | * @return this | ||||
* @task proxy | |||||
*/ | */ | ||||
final public function setProxy(PhabricatorCustomField $proxy) { | final public function setProxy(PhabricatorCustomField $proxy) { | ||||
if (!$this->canSetProxy()) { | if (!$this->canSetProxy()) { | ||||
throw new PhabricatorCustomFieldNotProxyException($this); | throw new PhabricatorCustomFieldNotProxyException($this); | ||||
} | } | ||||
$this->proxy = $proxy; | $this->proxy = $proxy; | ||||
return $this; | return $this; | ||||
} | } | ||||
/** | /** | ||||
* Get the field's proxy implementation, if any. For discussion, see | * Get the field's proxy implementation, if any. For discussion, see | ||||
* @{method:canSetProxy}. | * @{method:canSetProxy}. | ||||
* | * | ||||
* @return PhabricatorCustomField|null Proxy field, if one is set. | * @return PhabricatorCustomField|null Proxy field, if one is set. | ||||
* @task proxy | |||||
*/ | */ | ||||
final public function getProxy() { | final public function getProxy() { | ||||
return $this->proxy; | return $this->proxy; | ||||
} | } | ||||
/** | |||||
* @task proxy | |||||
*/ | |||||
public function __clone() { | |||||
if ($this->proxy) { | |||||
$this->proxy = clone $this->proxy; | |||||
} | |||||
} | |||||
/* -( Contextual Data )---------------------------------------------------- */ | /* -( Contextual Data )---------------------------------------------------- */ | ||||
/** | /** | ||||
* Sets the object this field belongs to. | * Sets the object this field belongs to. | ||||
* | * | ||||
* @param PhabricatorCustomFieldInterface The object this field belongs to. | * @param PhabricatorCustomFieldInterface The object this field belongs to. | ||||
* @return this | * @return this | ||||
▲ Show 20 Lines • Show All 405 Lines • ▼ Show 20 Lines | public function appendToApplicationSearchForm( | ||||
throw new PhabricatorCustomFieldImplementationIncompleteException($this); | throw new PhabricatorCustomFieldImplementationIncompleteException($this); | ||||
} | } | ||||
/* -( ApplicationTransactions )-------------------------------------------- */ | /* -( ApplicationTransactions )-------------------------------------------- */ | ||||
/** | /** | ||||
* Appearing in ApplicationTrasactions allows a field to be edited using | * Appearing in ApplicationTransactions allows a field to be edited using | ||||
* standard workflows. | * standard workflows. | ||||
* | * | ||||
* @return bool True to appear in ApplicationTransactions. | * @return bool True to appear in ApplicationTransactions. | ||||
* @task appxaction | * @task appxaction | ||||
*/ | */ | ||||
public function shouldAppearInApplicationTransactions() { | public function shouldAppearInApplicationTransactions() { | ||||
if ($this->proxy) { | if ($this->proxy) { | ||||
return $this->proxy->shouldAppearInApplicationTransactions(); | return $this->proxy->shouldAppearInApplicationTransactions(); | ||||
▲ Show 20 Lines • Show All 875 Lines • Show Last 20 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0