id = $data['id']; } public function processRequest() { $request = $this->getRequest(); $user = $request->getUser(); $timer = id(new PhabricatorTimer())->load($this->id); if (!$timer) { return new Aphront404Response(); } require_celerity_resource('phabricator-countdown-css'); $chrome_visible = $request->getBool('chrome', true); $chrome_new = $chrome_visible ? false : null; $chrome_link = phutil_render_tag( 'a', array( 'href' => $request->getRequestURI()->alter('chrome', $chrome_new), 'class' => 'phabricator-timer-chrome-link', ), $chrome_visible ? 'Disable Chrome' : 'Enable Chrome'); $content = '

'. phutil_escape_html($timer->getTitle()).' · '. phabricator_datetime($timer->getDatePoint(), $user). '

Days Hours Minutes Seconds
'. $chrome_link. '
'; Javelin::initBehavior('countdown-timer', array( 'timestamp' => $timer->getDatepoint() )); $panel = $content; return $this->buildStandardPageResponse( $panel, array( 'title' => 'Countdown: '.$timer->getTitle(), 'chrome' => $chrome_visible )); } }