Exemplo n.º 1
0
 /**
  * @param array $notification
  * @param string $groupID
  */
 public function prepareNotification(&$notification, $groupID)
 {
     if (in_array($notification['id'], $this->notificationGroups->getNotificationsWithIntegerType())) {
         $notification['type'] = 'integer';
     } else {
         $notification['type'] = 'list';
         $notification['list_values'] = SJB_EmailTemplateEditor::getEmailTemplatesForListByGroup($groupID);
     }
     $notification['is_required'] = false;
     $notification['is_system'] = false;
 }
Exemplo n.º 2
0
 public static function getDetails()
 {
     return array(array('id' => 'id', 'caption' => 'ID', 'type' => 'unique_string', 'validators' => array('SJB_IdValidator', 'SJB_UniqueSystemValidator'), 'length' => '20', 'table_name' => 'listing_types', 'is_required' => true, 'is_system' => true), array('id' => 'name', 'caption' => 'Name', 'type' => 'string', 'length' => '20', 'table_name' => 'listing_types', 'is_required' => true, 'is_system' => true), array('id' => 'waitApprove', 'caption' => 'Approve Postings by Admin', 'type' => 'boolean', 'length' => '', 'table_name' => 'listing_types_properties', 'comment' => 'Enable this setting if you want postings of this type<br /> to be approved by admin, before appearing on the site', 'is_required' => false, 'is_system' => true), array('id' => 'show_brief_or_detailed', 'caption' => 'Enable Brief/Detailed Search Results option', 'type' => 'boolean', 'length' => '', 'table_name' => 'listing_types_properties', 'is_required' => false, 'is_system' => true), array('id' => 'email_alert', 'caption' => 'Email Alert Template', 'type' => 'list', 'list_values' => SJB_EmailTemplateEditor::getEmailTemplatesForListByGroup(SJB_NotificationGroups::GROUP_ID_ALERTS), 'table_name' => 'listing_types_properties', 'is_required' => false, 'is_system' => true), array('id' => 'guest_alert_email', 'caption' => 'Guest Alert Email Template', 'type' => 'list', 'list_values' => SJB_EmailTemplateEditor::getEmailTemplatesForListByGroup(SJB_NotificationGroups::GROUP_ID_ALERTS), 'table_name' => 'listing_types_properties', 'is_required' => false, 'is_system' => true));
 }