2 ///////////////////////////////
3 // Assign personal user data //
4 ///////////////////////////////
6 // Get a new instance for personal data
7 $blockInstance = ObjectFactory::createObjectByConfiguredName('web_block_helper', array($this, 'persona_data'));
9 // Set the data source instance which must exist in registry
10 $blockInstance->prefetchValueInstance('user');
12 // Assign fields with template variables
13 $blockInstance->assignField('username');
14 $blockInstance->assignFieldWithFilter('user_status', "user_status_translator");
16 // Shall we include registration date?
17 if ($blockInstance->ifIncludeRegistrationStamp()) {
18 // Then assign it as well!
19 $blockInstance->assignFieldWithFilter('registered', 'formatTimestamp');
22 // Flush the content out to a template variable
23 $blockInstance->flushContent();
25 //////////////////////////////////////
26 // Assign the shipping company data //
27 //////////////////////////////////////
29 // Get a new instance for personal data
30 $blockInstance = ObjectFactory::createObjectByConfiguredName('web_block_helper', array($this, 'company_data'));
32 // Set the data source instance
33 $blockInstance->prefetchValueInstance('company', 'user');
35 // Assign the company name
36 if ($blockInstance->getValueInstance()->ifUserIsFounder()) {
37 // User is the founder of the company
38 $blockInstance->assignMessageField('company_status', "user_is_company_founder");
39 $blockInstance->assignLinkFieldWithAction('company_link' , "company_overview");
40 $blockInstance->assignMessageField('company_link_text', "link_text_company_overview");
41 $blockInstance->assignMessageField('company_link_title', "link_title_company_overview");
42 } elseif ($blockInstance->getValueInstance()->ifUserIsOwner()) {
43 // User owns the company
44 $blockInstance->assignMessageField('company_status', "user_is_company_owner");
45 $blockInstance->assignLinkFieldWithAction('company_link' , "company_overview");
46 $blockInstance->assignMessageField('company_link_text', "link_text_company_overview");
47 $blockInstance->assignMessageField('company_link_title', "link_title_company_overview");
48 } elseif ($blockInstance->getValueInstance()->ifUserIsEmployee()) {
49 // User is employed in company
50 $blockInstance->assignMessageField('company_status', "user_is_employed_in_company");
51 $blockInstance->assignLinkFieldWithAction('company_link' , "employee_overview");
52 $blockInstance->assignMessageField('company_link_text', "link_text_employee_overview");
53 $blockInstance->assignMessageField('company_link_title', "link_title_employee_overview");
55 // No company participation!
56 $blockInstance->assignMessageField('company_status', "user_not_assigned_company");
57 $blockInstance->assignLinkFieldWithAction('company_link' , "company");
58 $blockInstance->assignMessageField('company_link_text', "link_text_company");
59 $blockInstance->assignMessageField('company_link_title', "link_title_company");
62 // Flush the content out to a template variable
63 $blockInstance->flushContent();
65 // Get helper instance
66 $linkInstance = ObjectFactory::createObjectByConfiguredName('web_link_helper', array($this, 'logout_action_link', 'index.php?app={?app_short_name?}&page=login_area'));
69 $linkInstance->addLinkGroup('logout', "");
70 $linkInstance->addActionLink('logout', "Ausloggen");
73 $linkInstance->flushContent();
77 <div id="content_header">
78 Willkommen im Loginbereich von {?app_full_name?}!
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">
94 <div id="logout_link">
95 {?logout_action_link?}
99 <div id="company_data" title="Informationen zu der aktuell ausgewählten Reederei">
100 <div id="company_header">
104 <div id="company_body">