-
Notifications
You must be signed in to change notification settings - Fork 3
/
exportword0bee
333 lines (304 loc) · 10.3 KB
/
exportword0bee
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
Message-ID: <1179456988.3352.1485852793053.JavaMail.confluence@ip-10-127-227-164>
Subject: Exported From Confluence
MIME-Version: 1.0
Content-Type: multipart/related;
boundary="----=_Part_3351_1934725923.1485852793053"
------=_Part_3351_1934725923.1485852793053
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Content-Location: file:///C:/exported.html
<html xmlns:o=3D'urn:schemas-microsoft-com:office:office'
xmlns:w=3D'urn:schemas-microsoft-com:office:word'
xmlns:v=3D'urn:schemas-microsoft-com:vml'
xmlns=3D'urn:w3-org-ns:HTML'>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dutf-8=
">
<title>ez_trans_prop</title>
<!--[if gte mso 9]>
<xml>
<o:OfficeDocumentSettings>
<o:TargetScreenSize>1024x640</o:TargetScreenSize>
<o:PixelsPerInch>72</o:PixelsPerInch>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
<w:WordDocument>
<w:View>Print</w:View>
<w:Zoom>90</w:Zoom>
<w:DoNotOptimizeForBrowser/>
</w:WordDocument>
</xml>
<![endif]-->
<style>
<!--
@page Section1 {
size: 8.5in 11.0in;
margin: 1.0in;
mso-header-margin: .5in;
mso-footer-margin: .5in;
mso-paper-source: 0;
}
td {
page-break-inside: avoid;
}
tr {
page-break-after: avoid;
}
div.Section1 {
page: Section1;
}
/* Confluence print stylesheet. Common to all themes for print medi=
a */
/* Full of !important until we improve batching for print CSS */
@media print {
#main {
padding-bottom: 1em !important; /* The default padding of 6em is to=
o much for printouts */
}
body {
font-family: Arial, Helvetica, FreeSans, sans-serif;
font-size: 10pt;
line-height: 1.2;
}
body, #full-height-container, #main, #page, #content, .has-personal-sid=
ebar #content {
background: #fff !important;
color: #000 !important;
border: 0 !important;
width: 100% !important;
height: auto !important;
min-height: auto !important;
margin: 0 !important;
padding: 0 !important;
display: block !important;
}
a, a:link, a:visited, a:focus, a:hover, a:active {
color: #000;
}
#content h1,
#content h2,
#content h3,
#content h4,
#content h5,
#content h6 {
font-family: Arial, Helvetica, FreeSans, sans-serif;
page-break-after: avoid;
}
pre {
font-family: Monaco, "Courier New", monospace;
}
#header,
.aui-header-inner,
#navigation,
#sidebar,
.sidebar,
#personal-info-sidebar,
.ia-fixed-sidebar,
.page-actions,
.navmenu,
.ajs-menu-bar,
.noprint,
.inline-control-link,
.inline-control-link a,
a.show-labels-editor,
.global-comment-actions,
.comment-actions,
.quick-comment-container,
#addcomment {
display: none !important;
}
.comment .date::before {
content: none !important; /* remove middot for print view */
}
h1.pagetitle img {
height: auto;
width: auto;
}
.print-only {
display: block;
}
#footer {
position: relative !important; /* CONF-17506 Place the footer at en=
d of the content */
margin: 0;
padding: 0;
background: none;
clear: both;
}
#poweredby {
border-top: none;
background: none;
}
#poweredby li.print-only {
display: list-item;
font-style: italic;
}
#poweredby li.noprint {
display: none;
}
/* no width controls in print */
.wiki-content .table-wrap,
.wiki-content p,
.panel .codeContent,
.panel .codeContent pre,
.image-wrap {
overflow: visible !important;
}
/* TODO - should this work? */
#children-section,
#comments-section .comment,
#comments-section .comment .comment-body,
#comments-section .comment .comment-content,
#comments-section .comment p {
page-break-inside: avoid;
}
#page-children a {
text-decoration: none;
}
/**
hide twixies
the specificity here is a hack because print styles
are getting loaded before the base styles. */
#comments-section.pageSection .section-header,
#comments-section.pageSection .section-title,
#children-section.pageSection .section-header,
#children-section.pageSection .section-title,
.children-show-hide {
padding-left: 0;
margin-left: 0;
}
.children-show-hide.icon {
display: none;
}
/* personal sidebar */
.has-personal-sidebar #content {
margin-right: 0px;
}
.has-personal-sidebar #content .pageSection {
margin-right: 0px;
}
}
-->
</style>
</head>
<body>
<h1>ez_trans_prop</h1>
<div class=3D"Section1">
<p><style type=3D"text/css">/*<![CDATA[*/
div.rbtoc1485852793037 {padding: 0px;}
div.rbtoc1485852793037 ul {list-style: disc;margin-left: 0px;}
div.rbtoc1485852793037 li {margin-left: 0px;padding-left: 0px;}
/*]]>*/</style></p>
<div class=3D"toc-macro rbtoc1485852793037">=20
<ul class=3D"toc-indentation">=20
<li><a href=3D"#ez_trans_prop-Description">Description</a></li>=20
<li><a href=3D"#ez_trans_prop-PrototypeandArguments">Prototype and Argument=
s</a>=20
<ul class=3D"toc-indentation">=20
<li><a href=3D"#ez_trans_prop-Mainlanguageuse">Main language use</a></li>=
=20
</ul> </li>=20
<li><a href=3D"#ez_trans_prop-Usage">Usage</a></li>=20
</ul>=20
</div>
<p></p>
<h2 id=3D"ez_trans_prop-Description">Description</h2>
<p><code>ez_trans_prop()</code> is a generic, low level Twig helper which c=
orrects the translated value of a multi valued(translations) property. =
;</p>
<div class=3D"confluence-information-macro confluence-information-macro-inf=
ormation">
<span class=3D"aui-icon aui-icon-small aui-iconfont-info confluence-informa=
tion-macro-icon"></span>
<div class=3D"confluence-information-macro-body">
If the current language cannot be found as a translation for content, the m=
ain language (see=20
<a href=3D"#ez_trans_prop-ez_trans_prop-Mainlanguageuse">further down for d=
etails</a>) will be used if this is supported by the provided=20
<strong>object</strong>. This behavior is identical when
<span> forcing a language using </span>
<strong>forcedLanguage.</strong>
</div>
</div>
<h2 id=3D"ez_trans_prop-PrototypeandArguments">Prototype and Arguments</h2>
<p><code><strong>ez_trans_prop(</strong> ValueObject <strong>obje=
ct, </strong>string<strong> <strong>property</strong></strong>[, string&nbs=
p;<strong>forcedLanguage</strong>] <strong>)</strong></code></p>
<div class=3D"table-wrap">
<table class=3D"confluenceTable">
<tbody>
<tr>
<th class=3D"confluenceTh">Argument name</th>
<th colspan=3D"1" class=3D"confluenceTh">Type</th>
<th class=3D"confluenceTh">Description</th>
</tr>
<tr>
<td class=3D"confluenceTd"><code>object</code></td>
<td colspan=3D"1" class=3D"confluenceTd"><code>eZ\Publish\Core\Repository\V=
alues\ValueObject</code></td>
<td class=3D"confluenceTd">ValueObject object <strong>property</strong=
> belongs to.</td>
</tr>
<tr>
<td colspan=3D"1" class=3D"confluenceTd">property</td>
<td colspan=3D"1" class=3D"confluenceTd"><code>string</code></td>
<td colspan=3D"1" class=3D"confluenceTd">Property to get translated value f=
rom, logic is using one of the following <em>(in this order)</em>:
<ul style=3D"list-style-type: square;">
<li><em>object method</em> "get{<strong>property</strong>}" <em><br></=
em></li>
<li><em>object property</em> "{<strong>property</strong>}s"</li>
</ul></td>
</tr>
<tr>
<td colspan=3D"1" class=3D"confluenceTd"><code>forcedLanguage</code></td>
<td colspan=3D"1" class=3D"confluenceTd"><code>string</code></td>
<td colspan=3D"1" class=3D"confluenceTd">Optional language we want to force=
<em>(e.g. "<code>eng-US</code>")</em>, otherwise takes prioritized languag=
es from SiteAccess settings.</td>
</tr>
</tbody>
</table>
</div>
<h4 id=3D"ez_trans_prop-Mainlanguageuse">Main language use</h4>
<p>Main language is attempted to be applied in the following way for V=
alue objects that support this:</p>
<ul>
<li><span><em><span style=3D"line-height: 1.42857;">When attribute is =
</span>retrieved<span style=3D"line-height: 1.42857;"> via object =
;property</span></em><span style=3D"line-height: 1.42857;">: Use </span><st=
rong style=3D"line-height: 1.42857;">mainLanguageCode</strong><span style=
=3D"line-height: 1.42857;"> property if it exists as fallback language, but=
only if either </span><strong style=3D"line-height: 1.42857;">alwaysA=
vailable</strong><span style=3D"line-height: 1.42857;"> property does =
not exists or is true.</span></span></li>
</ul>
<ul class=3D"task-list">
<li><em><em>When attribute is <em>retrieved</em> via object =
</em>method</em>: Provide <code>$language =3D null</code> as the only argum=
ent to the method, depends on logic of ValueObject if this gives a fallback=
value or not</li>
</ul>
<h2 id=3D"ez_trans_prop-Usage">Usage</h2>
<p>Example below shows how this function can be used to get the Content nam=
e with exact same result as using <code>ez_content_name(content)</code=
></p>
<div class=3D"code panel pdl" style=3D"border-width: 1px;">
<div class=3D"codeContent panelContent pdl">=20
<pre class=3D"brush: php; gutter: false; theme: Eclipse" style=3D"font-size=
:12px;">{{ ez_trans_prop( versionInfo, "name" ) }}</pre>=20
</div>
</div>
<p>Example for <code>ContentType->names</code>:</p>
<div class=3D"code panel pdl" style=3D"border-width: 1px;">
<div class=3D"codeContent panelContent pdl">=20
<pre class=3D"brush: php; gutter: false; theme: Eclipse" style=3D"font-size=
:12px;">{{ ez_trans_prop( contentType, "name" ) }}</pre>=20
</div>
</div>
<p> </p>
<p> </p>
</div>
</body>
</html>
------=_Part_3351_1934725923.1485852793053--