public function renderView()
 {
     $data = $this->getStoryData();
     $author_phid = $data->getAuthorPHID();
     $document_phid = $data->getValue('phid');
     $view = new PhabricatorFeedStoryView();
     $action = $data->getValue('action');
     $verb = PhrictionActionConstants::getActionPastTenseVerb($action);
     $view->setTitle($this->linkTo($author_phid) . " {$verb} the document " . $this->linkTo($document_phid) . '.');
     $view->setEpoch($data->getEpoch());
     $action = $data->getValue('action');
     switch ($action) {
         case PhrictionActionConstants::ACTION_CREATE:
             $full_size = true;
             break;
         default:
             $full_size = false;
             break;
     }
     if ($full_size) {
         $view->setImage($this->getHandle($author_phid)->getImageURI());
         $content = $this->renderSummary($data->getValue('content'));
         $view->appendChild($content);
     } else {
         $view->setOneLineStory(true);
     }
     return $view;
 }
 public function renderView()
 {
     $data = $this->getStoryData();
     $handles = $this->getHandles();
     $author_phid = $data->getAuthorPHID();
     $document_phid = $data->getValue('phid');
     $objects = $this->getObjects();
     $view = new PhabricatorFeedStoryView();
     $action = $data->getValue('action');
     $verb = PhrictionActionConstants::getActionPastTenseVerb($action);
     $view->setTitle('<strong>' . $handles[$author_phid]->renderLink() . '</strong>' . ' ' . $verb . ' the document ' . '<strong>' . $handles[$document_phid]->renderLink() . '</strong>.');
     $view->setEpoch($data->getEpoch());
     $action = $data->getValue('action');
     switch ($action) {
         case PhrictionActionConstants::ACTION_CREATE:
             $full_size = true;
             break;
         default:
             $full_size = false;
             break;
     }
     if ($full_size) {
         if (!empty($objects[$author_phid])) {
             $image_phid = $objects[$author_phid]->getProfileImagePHID();
             $image_uri = PhabricatorFileURI::getViewURIForPHID($image_phid);
             $view->setImage($image_uri);
         }
         $content = phutil_escape_html($data->getValue('content'));
         $content = str_replace("\n", '<br />', $content);
         $view->appendChild($content);
     } else {
         $view->setOneLineStory(true);
     }
     return $view;
 }
 public function renderText()
 {
     $author_handle = $this->getHandle($this->getAuthorPHID());
     $author_name = $author_handle->getName();
     $document_handle = $this->getHandle($this->getPrimaryObjectPHID());
     $document_title = $document_handle->getLinkName();
     $document_uri = PhabricatorEnv::getURI($document_handle->getURI());
     $action = $this->getValue('action');
     $verb = PhrictionActionConstants::getActionPastTenseVerb($action);
     $text = "{$author_name} {$verb} the document" . " {$document_title} {$document_uri}";
     return $text;
 }