[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 interface PhabricatorSubscribableInterface { 4 5 /** 6 * Return true to indicate that the given PHID is automatically subscribed 7 * to the object (for example, they are the author or in some other way 8 * irrevocably a subscriber). This will, e.g., cause the UI to render 9 * "Automatically Subscribed" instead of "Subscribe". 10 * 11 * @param PHID PHID (presumably a user) to test for automatic subscription. 12 * @return bool True if the object/user is automatically subscribed. 13 */ 14 public function isAutomaticallySubscribed($phid); 15 16 17 /** 18 * Return `true` to indicate that "Subscribers:" should be shown when 19 * rendering property lists for this object, or `false` to omit the property. 20 * 21 * @return bool True to show the "Subscribers:" property. 22 */ 23 public function shouldShowSubscribersProperty(); 24 25 26 /** 27 * Return `true` to indicate that the "Subscribe" action should be shown and 28 * enabled when rendering action lists for this object, or `false` to omit 29 * the action. 30 * 31 * @param phid Viewing or acting user PHID. 32 * @return bool True to allow the user to subscribe. 33 */ 34 public function shouldAllowSubscription($phid); 35 36 } 37 38 // TEMPLATE IMPLEMENTATION ///////////////////////////////////////////////////// 39 40 /* -( PhabricatorSubscribableInterface )----------------------------------- */ 41 /* 42 43 public function isAutomaticallySubscribed($phid) { 44 return false; 45 } 46 47 public function shouldShowSubscribersProperty() { 48 return true; 49 } 50 51 public function shouldAllowSubscription($phid) { 52 return true; 53 } 54 55 */
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 |