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

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.
 getMultiIconsHTML ()
 Get HTML for multiple value icons.
- 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

ilBillingMailPlaceholdersPropertyGUI::__construct ( )

Member Function Documentation

ilBillingMailPlaceholdersPropertyGUI::insert (   $a_tpl)

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

References $lng.

{
global $lng;
$subtpl = new ilTemplate("tpl.billingmail_new_placeholders.html", false, false, "Services/Payment");
$subtpl->setVariable('TXT_USE_PLACEHOLDERS', $lng->txt('mail_nacc_use_placeholder'));
$subtpl->setVariable('TXT_PLACEHOLDERS_ADVISE', sprintf($lng->txt('placeholders_advise'), '<br />'));
$subtpl->setVariable('TXT_MAIL_SALUTATION', $lng->txt('mail_nacc_salutation'));
$subtpl->setVariable('TXT_FIRST_NAME', $lng->txt('firstname'));
$subtpl->setVariable('TXT_LAST_NAME', $lng->txt('lastname'));
$subtpl->setVariable('TXT_LOGIN', $lng->txt('mail_nacc_login'));
$subtpl->setVariable('TXT_ILIAS_URL', $lng->txt('mail_nacc_ilias_url'));
$subtpl->setVariable('TXT_CLIENT_NAME', $lng->txt('mail_nacc_client_name'));
#$subtpl->setVariable('TXT_TRANSACTION', $lng->txt('transaction'));
#$subtpl->setVariable('TXT_TRANSACTION_EXTERN', $lng->txt('transaction_extern'));
#$subtpl->setVariable('TXT_ORDER_DATE', $lng->txt('order_date'));
$a_tpl->setCurrentBlock("prop_generic");
$a_tpl->setVariable("PROP_GENERIC", $subtpl->get());
$a_tpl->parseCurrentBlock();
}
static ilBillingMailPlaceholdersPropertyGUI::replaceBillingMailPlaceholders (   $a_message,
  $a_user_id 
)
static

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

References $lng.

Referenced by ilPurchaseBaseGUI\__sendBill().

{
global $lng;
$user = new ilObjUser($a_user_id);
// determine salutation
switch ($user->getGender())
{
case 'f': $gender_salut = $lng->txt('salutation_f');
break;
case 'm': $gender_salut = $lng->txt('salutation_m');
break;
}
$a_message = str_replace('[MAIL_SALUTATION]', $gender_salut, $a_message);
$a_message = str_replace('[LOGIN]', $user->getLogin(), $a_message);
$a_message = str_replace('[FIRST_NAME]', $user->getFirstname(), $a_message);
$a_message = str_replace('[LAST_NAME]', $user->getLastname(), $a_message);
$a_message = str_replace('[ILIAS_URL]', ILIAS_HTTP_PATH.'/login.php?client_id='.CLIENT_ID, $a_message);
$a_message = str_replace('[CLIENT_NAME]', CLIENT_NAME, $a_message);
include_once './Services/Payment/classes/class.ilShopLinkBuilder.php';
$shopLB = new ilShopLinkBuilder();
$bought_objects_url = $shopLB->buildLink('ilShopBoughtObjectsGUI');
$shop_url = $shopLB->buildLink('ilShopGUI');
$a_message = str_replace('[SHOP_BOUGHT_OBJECTS_URL]', $bought_objects_url, $a_message);
$a_message = str_replace('[SHOP_URL]', $shop_url, $a_message);
unset($user);
return $a_message;
}

+ Here is the caller graph for this function:


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