Differential D15063 Diff 36373 src/applications/subscriptions/interface/PhabricatorSubscribableInterface.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/subscriptions/interface/PhabricatorSubscribableInterface.php
Show All 16 Lines | interface PhabricatorSubscribableInterface { | ||||
/** | /** | ||||
* Return `true` to indicate that "Subscribers:" should be shown when | * Return `true` to indicate that "Subscribers:" should be shown when | ||||
* rendering property lists for this object, or `false` to omit the property. | * rendering property lists for this object, or `false` to omit the property. | ||||
* | * | ||||
* @return bool True to show the "Subscribers:" property. | * @return bool True to show the "Subscribers:" property. | ||||
*/ | */ | ||||
public function shouldShowSubscribersProperty(); | public function shouldShowSubscribersProperty(); | ||||
/** | |||||
* Return `true` to indicate that the "Subscribe" action should be shown and | |||||
* enabled when rendering action lists for this object, or `false` to omit | |||||
* the action. | |||||
* | |||||
* @param phid Viewing or acting user PHID. | |||||
* @return bool True to allow the user to subscribe. | |||||
*/ | |||||
public function shouldAllowSubscription($phid); | |||||
} | } | ||||
// TEMPLATE IMPLEMENTATION ///////////////////////////////////////////////////// | // TEMPLATE IMPLEMENTATION ///////////////////////////////////////////////////// | ||||
/* -( PhabricatorSubscribableInterface )----------------------------------- */ | /* -( PhabricatorSubscribableInterface )----------------------------------- */ | ||||
/* | /* | ||||
public function isAutomaticallySubscribed($phid) { | public function isAutomaticallySubscribed($phid) { | ||||
return false; | return false; | ||||
} | } | ||||
public function shouldShowSubscribersProperty() { | public function shouldShowSubscribersProperty() { | ||||
return true; | return true; | ||||
} | } | ||||
public function shouldAllowSubscription($phid) { | |||||
return true; | |||||
} | |||||
*/ | */ |