Exemple #1
0
 /**
  * ПОлучаем список шаблонов для рассылки
  * @return array
  */
 public function getSubscriptionTemplates()
 {
     $obMailTemplates = MailTemplate::where('code', 'LIKE', 'lovata.subscriptions%')->get();
     if (empty($obMailTemplates)) {
         return [];
     }
     $arList = [];
     foreach ($obMailTemplates as $obMailTemplate) {
         $arList[$obMailTemplate->code] = $obMailTemplate->subject;
     }
     return $arList;
 }
Exemple #2
0
 public function getMailGroupInviteTemplateOptions()
 {
     switch ($this->comunication_channel) {
         case self::CHANNEL_EMAIL:
             return MailTemplate::where('code', 'LIKE', 'dma.friends::%')->orderBy('code')->lists('code', 'code');
             break;
         case self::CHANNEL_TEXT:
             return [];
             //MailTemplate::orderBy('code')->lists('code', 'code');
             break;
         case self::CHANNEL_KIOSK:
             return [];
             //MailTemplate::orderBy('code')->lists('code', 'code');
             break;
     }
 }