2016-04-06 13:37:01 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
final class PhabricatorColumnsEditField
|
|
|
|
extends PhabricatorPHIDListEditField {
|
|
|
|
|
2016-04-06 14:59:09 +02:00
|
|
|
private $columnMap;
|
|
|
|
|
|
|
|
public function setColumnMap(array $column_map) {
|
|
|
|
$this->columnMap = $column_map;
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getColumnMap() {
|
|
|
|
return $this->columnMap;
|
|
|
|
}
|
|
|
|
|
2016-04-06 13:37:01 +02:00
|
|
|
protected function newControl() {
|
|
|
|
$control = id(new AphrontFormHandlesControl());
|
|
|
|
$control->setIsInvisible(true);
|
|
|
|
|
|
|
|
return $control;
|
|
|
|
}
|
|
|
|
|
|
|
|
protected function newHTTPParameterType() {
|
|
|
|
return new AphrontPHIDListHTTPParameterType();
|
|
|
|
}
|
|
|
|
|
|
|
|
protected function newConduitParameterType() {
|
|
|
|
return new ConduitColumnsParameterType();
|
|
|
|
}
|
|
|
|
|
2016-04-06 14:59:09 +02:00
|
|
|
protected function newCommentAction() {
|
|
|
|
$column_map = $this->getColumnMap();
|
|
|
|
if (!$column_map) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
return id(new PhabricatorEditEngineColumnsCommentAction())
|
|
|
|
->setColumnMap($this->getColumnMap());
|
|
|
|
}
|
|
|
|
|
2016-04-06 13:37:01 +02:00
|
|
|
}
|