Changeset View
Changeset View
Standalone View
Standalone View
src/applications/project/storage/PhabricatorProjectColumn.php
<?php | <?php | ||||
final class PhabricatorProjectColumn | final class PhabricatorProjectColumn | ||||
extends PhabricatorProjectDAO | extends PhabricatorProjectDAO | ||||
implements PhabricatorPolicyInterface, | implements PhabricatorPolicyInterface, | ||||
PhabricatorDestructableInterface { | PhabricatorDestructableInterface { | ||||
const STATUS_ACTIVE = 0; | const STATUS_ACTIVE = 0; | ||||
const STATUS_DELETED = 1; | const STATUS_HIDDEN = 1; | ||||
protected $name; | protected $name; | ||||
protected $status; | protected $status; | ||||
protected $projectPHID; | protected $projectPHID; | ||||
protected $sequence; | protected $sequence; | ||||
private $project = self::ATTACHABLE; | private $project = self::ATTACHABLE; | ||||
Show All 22 Lines | final class PhabricatorProjectColumn | ||||
public function getProject() { | public function getProject() { | ||||
return $this->assertAttached($this->project); | return $this->assertAttached($this->project); | ||||
} | } | ||||
public function isDefaultColumn() { | public function isDefaultColumn() { | ||||
return ($this->getSequence() == 0); | return ($this->getSequence() == 0); | ||||
} | } | ||||
public function isDeleted() { | public function isHidden() { | ||||
return ($this->getStatus() == self::STATUS_DELETED); | return ($this->getStatus() == self::STATUS_HIDDEN); | ||||
} | } | ||||
public function getDisplayName() { | public function getDisplayName() { | ||||
if ($this->isDefaultColumn()) { | if ($this->isDefaultColumn()) { | ||||
return pht('Backlog'); | return pht('Backlog'); | ||||
} | } | ||||
return $this->getName(); | return $this->getName(); | ||||
} | } | ||||
public function getHeaderColor() { | public function getHeaderColor() { | ||||
if ($this->isHidden()) { | |||||
return PHUIActionHeaderView::HEADER_LIGHTRED; | |||||
} | |||||
if ($this->isDefaultColumn()) { | if ($this->isDefaultColumn()) { | ||||
return PHUIActionHeaderView::HEADER_DARK_GREY; | return PHUIActionHeaderView::HEADER_DARK_GREY; | ||||
} | } | ||||
return PHUIActionHeaderView::HEADER_GREY; | return PHUIActionHeaderView::HEADER_GREY; | ||||
} | } | ||||
/* -( PhabricatorPolicyInterface )----------------------------------------- */ | /* -( PhabricatorPolicyInterface )----------------------------------------- */ | ||||
Show All 35 Lines |