Skip to content

Commit 5b490e9

Browse files
Christopher Johnsonepriestley
authored andcommitted
Allow Javelin initBehavior to source alternative library behaviors
Summary: Ref T6467. Opens up initBehavior for non-phabricator sourced behaviors. Test Plan: Confirmed no impact on unset (default 'phabricator' source name) calls to initBehavior Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: aklapper, Korvin, epriestley Maniphest Tasks: T6467 Differential Revision: https://secure.phabricator.com/D10780
1 parent 000760b commit 5b490e9

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/applications/celerity/CelerityStaticResourceResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function getMetadataBlock() {
4040
public function initBehavior(
4141
$behavior,
4242
array $config = array(),
43-
$source_name = 'phabricator') {
43+
$source_name) {
4444

4545
$this->requireResource('javelin-behavior-'.$behavior, $source_name);
4646

src/infrastructure/javelin/Javelin.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,14 @@
22

33
final class Javelin {
44

5-
public static function initBehavior($behavior, array $config = array()) {
5+
public static function initBehavior(
6+
$behavior,
7+
array $config = array(),
8+
$source_name = 'phabricator') {
9+
610
$response = CelerityAPI::getStaticResourceResponse();
7-
$response->initBehavior($behavior, $config);
11+
12+
$response->initBehavior($behavior, $config, $source_name);
813
}
914

1015
}

0 commit comments

Comments
 (0)