Пример #1
0
 /**
  * Build the action component
  * @return string
  */
 public function buildAction()
 {
     $link = array();
     $ranks = array('primary', 'secondary');
     foreach ($ranks as $rank) {
         $message = $this->event->getLinkMessage($rank);
         // Valid call to action should have link text
         if (!$message) {
             continue;
         }
         $link[] = $this->decorator->decorateSingleAction($this->notifFormatter, $this->event, $this->user, $rank, $message);
     }
     // Add some spacing between the two action links
     $spacing = $this->decorator->getActionLinkSeparator();
     return implode($spacing . $spacing, $link);
 }