Changeset View
Changeset View
Standalone View
Standalone View
src/applications/transactions/edittype/PhabricatorEdgeEditType.php
| <?php | <?php | ||||
| final class PhabricatorEdgeEditType extends PhabricatorEditType { | final class PhabricatorEdgeEditType extends PhabricatorEditType { | ||||
| private $edgeOperation; | private $edgeOperation; | ||||
| private $valueDescription; | private $valueDescription; | ||||
| private $datasource; | |||||
| public function setEdgeOperation($edge_operation) { | public function setEdgeOperation($edge_operation) { | ||||
| $this->edgeOperation = $edge_operation; | $this->edgeOperation = $edge_operation; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function getEdgeOperation() { | public function getEdgeOperation() { | ||||
| return $this->edgeOperation; | return $this->edgeOperation; | ||||
| } | } | ||||
| public function setDatasource($datasource) { | |||||
| $this->datasource = $datasource; | |||||
| return $this; | |||||
| } | |||||
| public function getDatasource() { | |||||
| return $this->datasource; | |||||
| } | |||||
| public function getValueType() { | public function getValueType() { | ||||
| return 'list<phid>'; | return 'list<phid>'; | ||||
| } | } | ||||
| public function generateTransactions( | public function generateTransactions( | ||||
| PhabricatorApplicationTransaction $template, | PhabricatorApplicationTransaction $template, | ||||
| array $spec) { | array $spec) { | ||||
| Show All 16 Lines | public function setValueDescription($value_description) { | ||||
| $this->valueDescription = $value_description; | $this->valueDescription = $value_description; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function getValueDescription() { | public function getValueDescription() { | ||||
| return $this->valueDescription; | return $this->valueDescription; | ||||
| } | } | ||||
| public function getPHUIXControlType() { | |||||
| $datasource = $this->getDatasource(); | |||||
| if (!$datasource) { | |||||
| return null; | |||||
| } | |||||
| return 'tokenizer'; | |||||
| } | |||||
| public function getPHUIXControlSpecification() { | |||||
| $datasource = $this->getDatasource(); | |||||
| if (!$datasource) { | |||||
| return null; | |||||
| } | |||||
| $template = new AphrontTokenizerTemplateView(); | |||||
| return array( | |||||
| 'markup' => $template->render(), | |||||
| 'config' => array( | |||||
| 'src' => $datasource->getDatasourceURI(), | |||||
| 'browseURI' => $datasource->getBrowseURI(), | |||||
| 'placeholder' => $datasource->getPlaceholderText(), | |||||
| ), | |||||
| ); | |||||
| } | |||||
| } | } | ||||