Skip to content

Commit 8c71815

Browse files
author
vrana
committed
Merge renderChildren() and renderHTMLChildren()
Summary: `renderChildren()` now returns array which isn't ideal but I prefer it to having two methods. Test Plan: None. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D4910
1 parent ae4e580 commit 8c71815

31 files changed

+29
-45
lines changed

src/applications/differential/view/DifferentialChangesetDetailView.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public function render() {
101101
$buttons,
102102
phutil_tag('h1', array(), $display_filename),
103103
phutil_tag('div', array('style' => 'clear: both'), ''),
104-
$this->renderHTMLChildren(),
104+
$this->renderChildren(),
105105
)));
106106
}
107107

src/applications/differential/view/DifferentialInlineCommentEditView.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ private function renderBody() {
123123
array(
124124
'class' => 'differential-inline-comment-edit-body',
125125
),
126-
$this->renderHTMLChildren());
126+
$this->renderChildren());
127127

128128
$edit = phutil_tag(
129129
'edit',

src/applications/differential/view/DifferentialPrimaryPaneView.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public function render() {
1717
'class' => 'differential-primary-pane',
1818
'id' => $this->id,
1919
),
20-
$this->renderHTMLChildren());
20+
$this->renderChildren());
2121
}
2222

2323
}

src/applications/feed/view/PhabricatorFeedStoryView.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public function render() {
8989
array(
9090
'class' => 'phabricator-feed-story-body',
9191
),
92-
phutil_safe_html($this->renderChildren()));
92+
phutil_safe_html(implode('', $this->renderChildren())));
9393

9494
if ($this->epoch) {
9595
$foot = phabricator_datetime($this->epoch, $this->user);

src/applications/ponder/view/PonderVotableView.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public function render() {
8585
array(
8686
'class' => 'ponder-votebox-content',
8787
),
88-
$this->renderHTMLChildren()),
88+
$this->renderChildren()),
8989
));
9090
}
9191

src/applications/uiexample/examples/JavelinViewExampleServerView.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ public function render() {
88
array(
99
'class' => 'server-view',
1010
),
11-
$this->renderHTMLChildren());
11+
$this->renderChildren());
1212
}
1313

1414
}

src/docs/developer/rendering_html.diviner

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -124,14 +124,6 @@ return `phutil_tag()` or `javelin_tag()`:
124124

125125
return phutil_tag('div', ...);
126126

127-
@{class:AphrontView} subclasses can use `renderHTMLChildren()` and
128-
`renderSingleView()` to build @{class@libphutil:PhutilSafeHTML} objects from
129-
children or arbitrary lists of components.
130-
131-
@{class:AphrontView} subclasses should avoid `renderChildren()` and transition
132-
callers to `renderHTMLChildren()`. This older method does not return
133-
@{class@libphutil:PhutilSafeHTML} objects.
134-
135127
= Internationalization: pht() =
136128

137129
The @{function:pht} function has some special rules. If any input to

src/view/AphrontDialogView.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ final public function render() {
158158
}
159159

160160
$buttons[] = phutil_tag('div', array('style' => 'clear: both;'), '');
161-
$children = $this->renderHTMLChildren();
161+
$children = $this->renderChildren();
162162

163163
$content = hsprintf(
164164
'%s%s%s',

src/view/AphrontJavelinView.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function render() {
3232
'id' => $id,
3333
'view' => $this->getName(),
3434
'params' => $this->getParameters(),
35-
'children' => $this->renderChildren(),
35+
'children' => implode('', $this->renderChildren()),
3636
'trigger_id' => $render_context,
3737
));
3838

src/view/AphrontNullView.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
final class AphrontNullView extends AphrontView {
44

55
public function render() {
6-
return $this->renderHTMLChildren();
6+
return phutil_implode_html('', $this->renderChildren());
77
}
88

99
}

0 commit comments

Comments
 (0)