[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 final class PhabricatorAuditActionConstants { 4 5 const CONCERN = 'concern'; 6 const ACCEPT = 'accept'; 7 const COMMENT = 'comment'; 8 const RESIGN = 'resign'; 9 const CLOSE = 'close'; 10 const ADD_CCS = 'add_ccs'; 11 const ADD_AUDITORS = 'add_auditors'; 12 const INLINE = 'audit:inline'; 13 const ACTION = 'audit:action'; 14 15 public static function getActionNameMap() { 16 $map = array( 17 self::COMMENT => pht('Comment'), 18 self::CONCERN => pht("Raise Concern \xE2\x9C\x98"), 19 self::ACCEPT => pht("Accept Commit \xE2\x9C\x94"), 20 self::RESIGN => pht('Resign from Audit'), 21 self::CLOSE => pht('Close Audit'), 22 self::ADD_CCS => pht('Add CCs'), 23 self::ADD_AUDITORS => pht('Add Auditors'), 24 ); 25 26 return $map; 27 } 28 29 public static function getActionName($constant) { 30 $map = self::getActionNameMap(); 31 return idx($map, $constant, 'Unknown'); 32 } 33 34 public static function getActionPastTenseVerb($action) { 35 static $map = array( 36 self::COMMENT => 'commented on', 37 self::CONCERN => 'raised a concern with', 38 self::ACCEPT => 'accepted', 39 self::RESIGN => 'resigned from', 40 self::CLOSE => 'closed', 41 self::ADD_CCS => 'added CCs to', 42 self::ADD_AUDITORS => 'added auditors to', 43 ); 44 return idx($map, $action, 'updated'); 45 } 46 47 }
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 |