2 ///////////////////////////////
3 // Assign personal user data //
4 ///////////////////////////////
6 // Get a new instance for personal data
7 $blockInstance = ObjectFactory::createObjectByConfiguredName('html_block_helper_class', array($this, 'persona_data'));
9 // Set the data source instance which must exist in registry
10 $blockInstance->prefetchValueInstance('user', 'user_points');
12 // Assign fields with template variables
13 $blockInstance->assignField('username');
14 $blockInstance->assignFieldWithFilter('user_status', 'user_status_translator');
15 $blockInstance->assignFieldWithFilter('points', 'format_number');
17 // Shall we include registration date?
18 if ($blockInstance->ifIncludeRegistrationStamp()) {
19 // Then assign it as well!
20 $blockInstance->assignFieldWithFilter('registered', 'format_timestamp');
23 // Flush the content out to a template variable
24 $blockInstance->flushContent();
26 //////////////////////////////////////
27 // Assign the shipping company data //
28 //////////////////////////////////////
30 // Get a new instance for personal data
31 $blockInstance = ObjectFactory::createObjectByConfiguredName('html_block_helper_class', array($this, 'company_data'));
33 // Set the data source instance
34 $blockInstance->prefetchValueInstance('company', 'user');
36 // Assign the company name
37 if ($blockInstance->getValueInstance()->ifUserIsFounder()) {
38 // User is the founder of the company
39 $blockInstance->assignMessageField('company_status', 'user_is_company_founder');
40 $blockInstance->assignLinkFieldWithAction('company' , 'company_overview');
41 $blockInstance->assignMessageField('company', 'link_text_company_overview');
42 $blockInstance->assignMessageField('company_title', 'link_title_company_overview');
43 } elseif ($blockInstance->getValueInstance()->ifUserIsOwner()) {
44 // User owns the company
45 $blockInstance->assignMessageField('company_status', 'user_is_company_owner');
46 $blockInstance->assignLinkFieldWithAction('company' , 'company_overview');
47 $blockInstance->assignMessageField('company', 'link_text_company_overview');
48 $blockInstance->assignMessageField('company_title', 'link_title_company_overview');
49 } elseif ($blockInstance->getValueInstance()->ifUserIsEmployee()) {
50 // User is employed in company
51 $blockInstance->assignMessageField('company_status', 'user_is_employed_in_company');
52 $blockInstance->assignLinkFieldWithAction('company' , 'employee_overview');
53 $blockInstance->assignMessageField('company', 'link_text_employee_overview');
54 $blockInstance->assignMessageField('company_title', 'link_title_employee_overview');
56 // No company participation!
57 $blockInstance->assignMessageField('company_status', 'user_not_assigned_company');
58 $blockInstance->assignLinkFieldWithAction('company' , 'company');
59 $blockInstance->assignMessageField('company', 'link_text_company');
60 $blockInstance->assignMessageField('company_title', 'link_title_company');
63 // Flush the content out to a template variable
64 $blockInstance->flushContent();
66 // Get helper instance
67 $linkInstance = ObjectFactory::createObjectByConfiguredName('html_link_helper_class', array($this, 'logout'));
70 $linkInstance->addActionLinkById('logout', 'logout');
73 $linkInstance->flushContent();
77 <div id="content_header">
78 Willkommen im Loginbereich von <span class="app_name">{?app_full_name?}</span>!
81 <div id="content_body">
85 <div id="persona_data" title="Informationen zu Deinem Spieleaccount">
86 <div id="persona_header">
90 <div id="persona_body">
99 <div id="company_data" title="Informationen zu der aktuell ausgewählten Reederei">
100 <div id="company_header">
104 <div id="company_body">