Changeset View
Changeset View
Standalone View
Standalone View
src/applications/project/order/PhabricatorProjectColumnHeader.php
| <?php | <?php | ||||
| final class PhabricatorProjectColumnHeader | final class PhabricatorProjectColumnHeader | ||||
| extends Phobject { | extends Phobject { | ||||
| private $orderKey; | private $orderKey; | ||||
| private $headerKey; | private $headerKey; | ||||
| private $sortVector; | private $sortVector; | ||||
| private $name; | private $name; | ||||
| private $icon; | private $icon; | ||||
| private $editProperties; | private $editProperties; | ||||
| private $dropEffects = array(); | |||||
| public function setOrderKey($order_key) { | public function setOrderKey($order_key) { | ||||
| $this->orderKey = $order_key; | $this->orderKey = $order_key; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function getOrderKey() { | public function getOrderKey() { | ||||
| return $this->orderKey; | return $this->orderKey; | ||||
| Show All 39 Lines | public function setEditProperties(array $edit_properties) { | ||||
| $this->editProperties = $edit_properties; | $this->editProperties = $edit_properties; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function getEditProperties() { | public function getEditProperties() { | ||||
| return $this->editProperties; | return $this->editProperties; | ||||
| } | } | ||||
| public function addDropEffect(PhabricatorProjectDropEffect $effect) { | |||||
| $this->dropEffects[] = $effect; | |||||
| return $this; | |||||
| } | |||||
| public function getDropEffects() { | |||||
| return $this->dropEffects; | |||||
| } | |||||
| public function toDictionary() { | public function toDictionary() { | ||||
| return array( | return array( | ||||
| 'order' => $this->getOrderKey(), | 'order' => $this->getOrderKey(), | ||||
| 'key' => $this->getHeaderKey(), | 'key' => $this->getHeaderKey(), | ||||
| 'template' => hsprintf('%s', $this->newView()), | 'template' => hsprintf('%s', $this->newView()), | ||||
| 'vector' => $this->getSortVector(), | 'vector' => $this->getSortVector(), | ||||
| 'editProperties' => $this->getEditProperties(), | 'editProperties' => $this->getEditProperties(), | ||||
| 'effects' => mpull($this->getDropEffects(), 'toDictionary'), | |||||
| ); | ); | ||||
| } | } | ||||
| private function newView() { | private function newView() { | ||||
| $icon_view = $this->getIcon(); | $icon_view = $this->getIcon(); | ||||
| $name = $this->getName(); | $name = $this->getName(); | ||||
| $template = phutil_tag( | $template = phutil_tag( | ||||
| Show All 18 Lines | |||||