@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
at recaptime-dev/main 35 lines 821 B view raw
1<?php 2 3final class PhabricatorNotificationUIExample extends PhabricatorUIExample { 4 5 public function getName() { 6 return pht('Notifications'); 7 } 8 9 public function getDescription() { 10 return pht( 11 'Use %s to create notifications.', 12 phutil_tag('tt', array(), 'JX.Notification')); 13 } 14 15 public function getCategory() { 16 return pht('Technical'); 17 } 18 19 public function renderExample() { 20 require_celerity_resource('phabricator-notification-css'); 21 Javelin::initBehavior('phabricator-notification-example'); 22 23 $content = javelin_tag( 24 'a', 25 array( 26 'sigil' => 'notification-example', 27 'class' => 'button button-green', 28 ), 29 pht('Show Notification')); 30 31 $content = hsprintf('<div style="padding: 1em 3em;">%s</div>', $content); 32 33 return $content; 34 } 35}