예제 #1
0
 /**
  * 
  * 
  * 
  * @return type 
  */
 public function getNormalizedItems($aid = null)
 {
     if (!empty($aid)) {
         $this->automailingId = $aid;
     }
     $items = $this->getItems();
     foreach ($items as $idx => &$item) {
         // If this is a first element then check the automailing type to determine
         // verbal interpretation of it
         if ($idx == 0) {
             if ($item->automailing_type == 'eventbased') {
                 $item->time_verbal = JText::_('COM_NEWSLETTER_EVENT_SUBSCRIPTION');
             } else {
                 $item->time_verbal = date('Y-m-d', strtotime($item->time_start));
             }
         } else {
             $item->time_verbal = ($item->time_offset > 0 ? JText::_('COM_NEWSLETTER_AFTER') . ' ' : '') . DataHelper::timeIntervaltoVerbal($item->time_offset);
         }
     }
     return $items;
 }