コード例 #1
0
 public function buildPHUITimelineView($with_hiding = true)
 {
     if (!$this->getObjectPHID()) {
         throw new PhutilInvalidStateException('setObjectPHID');
     }
     $view = new PHUITimelineView();
     $view->setShouldTerminate($this->shouldTerminate);
     $view->setQuoteTargetID($this->getQuoteTargetID());
     $view->setQuoteRef($this->getQuoteRef());
     $events = $this->buildEvents($with_hiding);
     foreach ($events as $event) {
         $view->addEvent($event);
     }
     if ($this->getPager()) {
         $view->setPager($this->getPager());
     }
     if ($this->getRenderData()) {
         $view->setRenderData($this->getRenderData());
     }
     return $view;
 }
コード例 #2
0
 public function render()
 {
     if (!$this->getObjectPHID()) {
         throw new Exception('Call setObjectPHID() before render()!');
     }
     $view = new PHUITimelineView();
     $view->setShouldTerminate($this->shouldTerminate);
     $events = $this->buildEvents($with_hiding = true);
     foreach ($events as $event) {
         $view->addEvent($event);
     }
     if ($this->getShowEditActions()) {
         Javelin::initBehavior('phabricator-transaction-list');
     }
     return $view->render();
 }