[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 final class NuanceQueue 4 extends NuanceDAO 5 implements PhabricatorPolicyInterface { 6 7 protected $name; 8 protected $mailKey; 9 protected $viewPolicy; 10 protected $editPolicy; 11 12 public function getConfiguration() { 13 return array( 14 self::CONFIG_AUX_PHID => true, 15 self::CONFIG_COLUMN_SCHEMA => array( 16 'name' => 'text255?', 17 'mailKey' => 'bytes20', 18 ), 19 ) + parent::getConfiguration(); 20 } 21 22 public function generatePHID() { 23 return PhabricatorPHID::generateNewPHID( 24 NuanceQueuePHIDType::TYPECONST); 25 } 26 27 public function save() { 28 if (!$this->getMailKey()) { 29 $this->setMailKey(Filesystem::readRandomCharacters(20)); 30 } 31 return parent::save(); 32 } 33 34 public function getURI() { 35 return '/nuance/queue/view/'.$this->getID().'/'; 36 } 37 38 public function getCapabilities() { 39 return array( 40 PhabricatorPolicyCapability::CAN_VIEW, 41 PhabricatorPolicyCapability::CAN_EDIT, 42 ); 43 } 44 45 public function getPolicy($capability) { 46 switch ($capability) { 47 case PhabricatorPolicyCapability::CAN_VIEW: 48 return $this->getViewPolicy(); 49 case PhabricatorPolicyCapability::CAN_EDIT: 50 return $this->getEditPolicy(); 51 } 52 } 53 54 public function hasAutomaticCapability($capability, PhabricatorUser $viewer) { 55 return false; 56 } 57 58 public function describeAutomaticCapability($capability) { 59 return null; 60 } 61 62 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Nov 30 09:20:46 2014 | Cross-referenced by PHPXref 0.7.1 |