buildPlainTextResponseString());
}
$title = $this->getResponseTitle();
$resources = $this->buildResources();
$body_class = $this->getResponseBodyClass();
$body = $this->getResponseBody();
return (string)hsprintf(
<<
%s
%s
%s
EOTEMPLATE
,
$title,
$resources,
phutil_tag(
'body',
array(
'class' => $body_class,
),
$body));
}
private function buildResources() {
$paths = $this->getResources();
$webroot = dirname(phutil_get_library_root('phabricator')).'/webroot/';
$resources = array();
foreach ($paths as $path) {
$resources[] = phutil_tag(
'style',
array('type' => 'text/css'),
phutil_safe_html(Filesystem::readFile($webroot.'/rsrc/'.$path)));
}
return phutil_implode_html("\n", $resources);
}
}