Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2894548
AphrontPageView.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
1 KB
Referenced Files
None
Subscribers
None
AphrontPageView.php
View Options
<?php
abstract
class
AphrontPageView
extends
AphrontView
{
private
$title
;
public
function
setTitle
(
$title
)
{
$this
->
title
=
$title
;
return
$this
;
}
public
function
getTitle
(
)
{
$title
=
$this
->
title
;
if
(
is_array
(
$title
)
)
{
$title
=
implode
(
" \xC2\xB7 "
,
$title
)
;
}
return
$title
;
}
protected
function
getHead
(
)
{
return
''
;
}
protected
function
getBody
(
)
{
return
phutil_implode_html
(
''
,
$this
->
renderChildren
(
)
)
;
}
protected
function
getTail
(
)
{
return
''
;
}
protected
function
willRenderPage
(
)
{
return
;
}
protected
function
willSendResponse
(
$response
)
{
return
$response
;
}
protected
function
getBodyClasses
(
)
{
return
null
;
}
public
function
render
(
)
{
$this
->
willRenderPage
(
)
;
$title
=
$this
->
getTitle
(
)
;
$head
=
$this
->
getHead
(
)
;
$body
=
$this
->
getBody
(
)
;
$tail
=
$this
->
getTail
(
)
;
$body_classes
=
$this
->
getBodyClasses
(
)
;
$body
=
phutil_tag
(
'body'
,
array
(
'class'
=>
nonempty
(
$body_classes
,
null
)
,
)
,
array
(
$body
,
$tail
)
)
;
if
(
PhabricatorEnv
::
getEnvConfig
(
'policy.allow-public'
)
)
{
$html_open_tag
=
hsprintf
(
'<html prefix="og: http://ogp.me/ns#">'
)
;
}
else
{
$html_open_tag
=
hsprintf
(
'<html>'
)
;
}
$response
=
hsprintf
(
'<!DOCTYPE html>'
.
'%s'
.
'<head>'
.
'<meta charset="UTF-8" />'
.
'<title>%s</title>'
.
'%s'
.
'</head>'
.
'%s'
.
'</html>'
,
$html_open_tag
,
$title
,
$head
,
$body
)
;
$response
=
$this
->
willSendResponse
(
$response
)
;
return
$response
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Jan 19, 20:02 (1 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1128261
Default Alt Text
AphrontPageView.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment