Changeset View
Changeset View
Standalone View
Standalone View
src/applications/transactions/editengine/PhabricatorEditEngine.php
Show First 20 Lines • Show All 624 Lines • ▼ Show 20 Lines | /* -( Creating and Loading Objects )--------------------------------------- */ | ||||
* | * | ||||
* @return bool True if a new object is being created. | * @return bool True if a new object is being created. | ||||
* @task load | * @task load | ||||
*/ | */ | ||||
final public function getIsCreate() { | final public function getIsCreate() { | ||||
return $this->isCreate; | return $this->isCreate; | ||||
} | } | ||||
/** | |||||
* Initialize a new object for documentation creation. | |||||
* | |||||
* @return object Newly initialized object. | |||||
* @task load | |||||
*/ | |||||
protected function newEditableObjectForDocumentation() { | |||||
return $this->newEditableObject(); | |||||
} | |||||
/** | /** | ||||
* Flag this workflow as a create or edit. | * Flag this workflow as a create or edit. | ||||
* | * | ||||
* @param bool True if this is a create workflow. | * @param bool True if this is a create workflow. | ||||
* @return this | * @return this | ||||
* @task load | * @task load | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 1,552 Lines • ▼ Show 20 Lines | /* -( Conduit )------------------------------------------------------------ */ | ||||
} | } | ||||
public function getConduitEditTypes() { | public function getConduitEditTypes() { | ||||
$config = $this->loadDefaultConfiguration(); | $config = $this->loadDefaultConfiguration(); | ||||
if (!$config) { | if (!$config) { | ||||
return array(); | return array(); | ||||
} | } | ||||
$object = $this->newEditableObject(); | $object = $this->newEditableObjectForDocumentation(); | ||||
$fields = $this->buildEditFields($object); | $fields = $this->buildEditFields($object); | ||||
return $this->getConduitEditTypesFromFields($fields); | return $this->getConduitEditTypesFromFields($fields); | ||||
} | } | ||||
final public static function getAllEditEngines() { | final public static function getAllEditEngines() { | ||||
return id(new PhutilClassMapQuery()) | return id(new PhutilClassMapQuery()) | ||||
->setAncestorClass(__CLASS__) | ->setAncestorClass(__CLASS__) | ||||
->setUniqueMethod('getEngineKey') | ->setUniqueMethod('getEngineKey') | ||||
▲ Show 20 Lines • Show All 208 Lines • Show Last 20 Lines |