[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 final class PhabricatorToken extends PhabricatorTokenDAO 4 implements PhabricatorPolicyInterface { 5 6 protected $phid; 7 protected $name; 8 protected $filePHID; 9 10 public function getConfiguration() { 11 return array( 12 self::CONFIG_AUX_PHID => true, 13 self::CONFIG_NO_TABLE => true, 14 ) + parent::getConfiguration(); 15 } 16 17 public function getCapabilities() { 18 return array( 19 PhabricatorPolicyCapability::CAN_VIEW, 20 ); 21 } 22 23 public function getPolicy($capability) { 24 return PhabricatorPolicies::getMostOpenPolicy(); 25 } 26 27 public function hasAutomaticCapability($capability, PhabricatorUser $viewer) { 28 return false; 29 } 30 31 public function describeAutomaticCapability($capability) { 32 return null; 33 } 34 35 public function renderIcon() { 36 // TODO: Maybe move to a View class? 37 38 require_celerity_resource('sprite-tokens-css'); 39 require_celerity_resource('tokens-css'); 40 41 $sprite = substr($this->getPHID(), 10); 42 43 return id(new PHUIIconView()) 44 ->setSpriteSheet(PHUIIconView::SPRITE_TOKENS) 45 ->setSpriteIcon($sprite); 46 47 } 48 49 }
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 |