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');
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('html_block_helper_class', 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' , "company_overview");
40 $blockInstance->assignMessageField('company', "link_text_company_overview");
41 $blockInstance->assignMessageField('company_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' , "company_overview");
46 $blockInstance->assignMessageField('company', "link_text_company_overview");
47 $blockInstance->assignMessageField('company_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' , "employee_overview");
52 $blockInstance->assignMessageField('company', "link_text_employee_overview");
53 $blockInstance->assignMessageField('company_title', "link_title_employee_overview");
55 // No company participation!
56 $blockInstance->assignMessageField('company_status', "user_not_assigned_company");
57 $blockInstance->assignLinkFieldWithAction('company' , "company");
58 $blockInstance->assignMessageField('company', "link_text_company");
59 $blockInstance->assignMessageField('company_title', "link_title_company");
62 // Flush the content out to a template variable
63 $blockInstance->flushContent();
65 // Get helper instance
66 $linkInstance = ObjectFactory::createObjectByConfiguredName('html_link_helper_class', array($this, 'logout'));
69 $linkInstance->addActionLinkById('logout', 'logout');
72 $linkInstance->flushContent();
76 <div id="content_header">
77 Willkommen zum Staat in <span class="app_name">{?app_full_name?}</span>!
80 <div id="content_body">
81 {?government_failed_content?}
84 <div id="persona_data" title="Informationen zu Deinem Spieleaccount">
85 <div id="persona_header">
89 <div id="persona_body">
98 <div id="company_data" title="Informationen zu der aktuell ausgewählten Reederei">
99 <div id="company_header">
103 <div id="company_body">