ILIAS  release_4-4 Revision
ilBillingMailPlaceholdersPropertyGUI Class Reference
+ Inheritance diagram for ilBillingMailPlaceholdersPropertyGUI:
+ Collaboration diagram for ilBillingMailPlaceholdersPropertyGUI:

Public Member Functions

 __construct ()
 
 insert ($a_tpl)
 
- Public Member Functions inherited from ilFormPropertyGUI
 __construct ($a_title="", $a_postvar="")
 Constructor. More...
 
executeCommand ()
 Execute command. More...
 
 getType ()
 Get Type. More...
 
 setTitle ($a_title)
 Set Title. More...
 
 getTitle ()
 Get Title. More...
 
 setPostVar ($a_postvar)
 Set Post Variable. More...
 
 getPostVar ()
 Get Post Variable. More...
 
 getFieldId ()
 Get Post Variable. More...
 
 setInfo ($a_info)
 Set Information Text. More...
 
 getInfo ()
 Get Information Text. More...
 
 setAlert ($a_alert)
 Set Alert Text. More...
 
 getAlert ()
 Get Alert Text. More...
 
 setRequired ($a_required)
 Set Required. More...
 
 getRequired ()
 Get Required. More...
 
 setDisabled ($a_disabled)
 Set Disabled. More...
 
 getDisabled ()
 Get Disabled. More...
 
 checkInput ()
 Check input, strip slashes etc. More...
 
 setParentForm ($a_parentform)
 Set Parent Form. More...
 
 getParentForm ()
 Get Parent Form. More...
 
 setParent ($a_val)
 Set Parent GUI object. More...
 
 getParent ()
 Get Parent GUI object. More...
 
 getSubForm ()
 Get sub form html. More...
 
 hideSubForm ()
 Sub form hidden on init? More...
 
 setHiddenTitle ($a_val)
 Set hidden title (for screenreaders) More...
 
 getHiddenTitle ()
 Get hidden title. More...
 
 getItemByPostVar ($a_post_var)
 Get item by post var. More...
 
 serializeData ()
 serialize data More...
 
 unserializeData ($a_data)
 unserialize data More...
 
 writeToSession ()
 Write to session. More...
 
 clearFromSession ()
 Clear session value. More...
 
 readFromSession ()
 Read from session. More...
 
 getHiddenTag ($a_post_var, $a_value)
 Get hidden tag (used for disabled properties) More...
 
 setMulti ($a_multi, $a_sortable=false, $a_addremove=true)
 Set Multi. More...
 
 getMulti ()
 Get Multi. More...
 
 setMultiValues (array $a_values)
 Set multi values. More...
 
 getMultiValues ()
 Get multi values. More...
 
 getContentOutsideFormTag ()
 Get content that has to reside outside of the parent form tag, e.g. More...
 

Static Public Member Functions

static replaceBillingMailPlaceholders ($a_message, $a_user_id)
 

Additional Inherited Members

- Protected Member Functions inherited from ilFormPropertyGUI
 setType ($a_type)
 Set Type. More...
 
 getMultiIconsHTML ()
 Get HTML for multiple value icons. More...
 
- Protected Attributes inherited from ilFormPropertyGUI
 $type
 
 $title
 
 $postvar
 
 $info
 
 $alert
 
 $required = false
 
 $parentgui
 
 $parentform
 
 $hidden_title = ""
 
 $multi = false
 
 $multi_sortable = false
 
 $multi_addremove = true
 
 $multi_values
 

Detailed Description

Author
Nadia Ahmad nahma.nosp@m.d@da.nosp@m.tabay.nosp@m..de
Version
$Id:$

Definition at line 14 of file class.ilBillingMailPlaceholdersPropertyGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilBillingMailPlaceholdersPropertyGUI::__construct ( )

Definition at line 17 of file class.ilBillingMailPlaceholdersPropertyGUI.php.

18  {
19  parent::__construct('');
20  }

Member Function Documentation

◆ insert()

ilBillingMailPlaceholdersPropertyGUI::insert (   $a_tpl)

Definition at line 22 of file class.ilBillingMailPlaceholdersPropertyGUI.php.

References $lng.

23  {
24  global $lng;
25 
26  $subtpl = new ilTemplate("tpl.billingmail_new_placeholders.html", false, false, "Services/Payment");
27  $subtpl->setVariable('TXT_USE_PLACEHOLDERS', $lng->txt('mail_nacc_use_placeholder'));
28  $subtpl->setVariable('TXT_PLACEHOLDERS_ADVISE', sprintf($lng->txt('placeholders_advise'), '<br />'));
29  $subtpl->setVariable('TXT_MAIL_SALUTATION', $lng->txt('mail_nacc_salutation'));
30  $subtpl->setVariable('TXT_FIRST_NAME', $lng->txt('firstname'));
31  $subtpl->setVariable('TXT_LAST_NAME', $lng->txt('lastname'));
32  $subtpl->setVariable('TXT_LOGIN', $lng->txt('mail_nacc_login'));
33  $subtpl->setVariable('TXT_ILIAS_URL', $lng->txt('mail_nacc_ilias_url'));
34  $subtpl->setVariable('TXT_CLIENT_NAME', $lng->txt('mail_nacc_client_name'));
35 
36  #$subtpl->setVariable('TXT_TRANSACTION', $lng->txt('transaction'));
37  #$subtpl->setVariable('TXT_TRANSACTION_EXTERN', $lng->txt('transaction_extern'));
38  #$subtpl->setVariable('TXT_ORDER_DATE', $lng->txt('order_date'));
39 
40  $a_tpl->setCurrentBlock("prop_generic");
41  $a_tpl->setVariable("PROP_GENERIC", $subtpl->get());
42  $a_tpl->parseCurrentBlock();
43  }
special template class to simplify handling of ITX/PEAR
global $lng
Definition: privfeed.php:40

◆ replaceBillingMailPlaceholders()

static ilBillingMailPlaceholdersPropertyGUI::replaceBillingMailPlaceholders (   $a_message,
  $a_user_id 
)
static

Definition at line 46 of file class.ilBillingMailPlaceholdersPropertyGUI.php.

References $lng.

Referenced by ilPurchaseBaseGUI\__sendBill().

47  {
48  global $lng;
49 
50  $user = new ilObjUser($a_user_id);
51 
52  // determine salutation
53  switch ($user->getGender())
54  {
55  case 'f': $gender_salut = $lng->txt('salutation_f');
56  break;
57  case 'm': $gender_salut = $lng->txt('salutation_m');
58  break;
59  }
60 
61  $a_message = str_replace('[MAIL_SALUTATION]', $gender_salut, $a_message);
62  $a_message = str_replace('[LOGIN]', $user->getLogin(), $a_message);
63  $a_message = str_replace('[FIRST_NAME]', $user->getFirstname(), $a_message);
64  $a_message = str_replace('[LAST_NAME]', $user->getLastname(), $a_message);
65  $a_message = str_replace('[ILIAS_URL]', ILIAS_HTTP_PATH.'/login.php?client_id='.CLIENT_ID, $a_message);
66  $a_message = str_replace('[CLIENT_NAME]', CLIENT_NAME, $a_message);
67 
68 
69  include_once './Services/Payment/classes/class.ilShopLinkBuilder.php';
70  $shopLB = new ilShopLinkBuilder();
71  $bought_objects_url = $shopLB->buildLink('ilShopBoughtObjectsGUI');
72  $shop_url = $shopLB->buildLink('ilShopGUI');
73 
74  $a_message = str_replace('[SHOP_BOUGHT_OBJECTS_URL]', $bought_objects_url, $a_message);
75  $a_message = str_replace('[SHOP_URL]', $shop_url, $a_message);
76 
77  unset($user);
78 
79  return $a_message;
80  }
Class ilShopLinkBuilder.
global $lng
Definition: privfeed.php:40
+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: