Changeset View
Changeset View
Standalone View
Standalone View
src/applications/owners/storage/PhabricatorOwnersPackage.php
<?php | <?php | ||||
final class PhabricatorOwnersPackage | final class PhabricatorOwnersPackage | ||||
extends PhabricatorOwnersDAO | extends PhabricatorOwnersDAO | ||||
implements | implements | ||||
PhabricatorPolicyInterface, | PhabricatorPolicyInterface, | ||||
PhabricatorApplicationTransactionInterface, | PhabricatorApplicationTransactionInterface, | ||||
PhabricatorCustomFieldInterface, | PhabricatorCustomFieldInterface, | ||||
PhabricatorDestructibleInterface, | PhabricatorDestructibleInterface, | ||||
PhabricatorConduitResultInterface, | PhabricatorConduitResultInterface, | ||||
PhabricatorFulltextInterface, | PhabricatorFulltextInterface, | ||||
PhabricatorNgramsInterface { | PhabricatorNgramsInterface { | ||||
protected $name; | protected $name; | ||||
protected $originalName; | |||||
protected $auditingEnabled; | protected $auditingEnabled; | ||||
protected $autoReview; | protected $autoReview; | ||||
protected $description; | protected $description; | ||||
protected $primaryOwnerPHID; | protected $primaryOwnerPHID; | ||||
protected $mailKey; | protected $mailKey; | ||||
protected $status; | protected $status; | ||||
protected $viewPolicy; | protected $viewPolicy; | ||||
protected $editPolicy; | protected $editPolicy; | ||||
▲ Show 20 Lines • Show All 76 Lines • ▼ Show 20 Lines | final class PhabricatorOwnersPackage | ||||
} | } | ||||
protected function getConfiguration() { | protected function getConfiguration() { | ||||
return array( | return array( | ||||
// This information is better available from the history table. | // This information is better available from the history table. | ||||
self::CONFIG_TIMESTAMPS => false, | self::CONFIG_TIMESTAMPS => false, | ||||
self::CONFIG_AUX_PHID => true, | self::CONFIG_AUX_PHID => true, | ||||
self::CONFIG_COLUMN_SCHEMA => array( | self::CONFIG_COLUMN_SCHEMA => array( | ||||
'name' => 'sort128', | 'name' => 'sort', | ||||
'originalName' => 'text255', | |||||
'description' => 'text', | 'description' => 'text', | ||||
'primaryOwnerPHID' => 'phid?', | 'primaryOwnerPHID' => 'phid?', | ||||
'auditingEnabled' => 'bool', | 'auditingEnabled' => 'bool', | ||||
'mailKey' => 'bytes20', | 'mailKey' => 'bytes20', | ||||
'status' => 'text32', | 'status' => 'text32', | ||||
'autoReview' => 'text32', | 'autoReview' => 'text32', | ||||
'dominion' => 'text32', | 'dominion' => 'text32', | ||||
), | ), | ||||
Show All 14 Lines | final class PhabricatorOwnersPackage | ||||
} | } | ||||
public function isArchived() { | public function isArchived() { | ||||
return ($this->getStatus() == self::STATUS_ARCHIVED); | return ($this->getStatus() == self::STATUS_ARCHIVED); | ||||
} | } | ||||
public function setName($name) { | public function setName($name) { | ||||
$this->name = $name; | $this->name = $name; | ||||
if (!$this->getID()) { | |||||
$this->originalName = $name; | |||||
} | |||||
return $this; | return $this; | ||||
} | } | ||||
public function loadOwners() { | public function loadOwners() { | ||||
if (!$this->getID()) { | if (!$this->getID()) { | ||||
return array(); | return array(); | ||||
} | } | ||||
return id(new PhabricatorOwnersOwner())->loadAllWhere( | return id(new PhabricatorOwnersOwner())->loadAllWhere( | ||||
▲ Show 20 Lines • Show All 456 Lines • Show Last 20 Lines |