1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-24 06:20:56 +01:00

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
This commit is contained in:
Christopher Johnson 2014-11-04 06:47:07 -08:00 committed by epriestley
parent 000760b645
commit 5b490e98d8
2 changed files with 8 additions and 3 deletions

View file

@ -40,7 +40,7 @@ final class CelerityStaticResourceResponse {
public function initBehavior( public function initBehavior(
$behavior, $behavior,
array $config = array(), array $config = array(),
$source_name = 'phabricator') { $source_name) {
$this->requireResource('javelin-behavior-'.$behavior, $source_name); $this->requireResource('javelin-behavior-'.$behavior, $source_name);

View file

@ -2,9 +2,14 @@
final class Javelin { final class Javelin {
public static function initBehavior($behavior, array $config = array()) { public static function initBehavior(
$behavior,
array $config = array(),
$source_name = 'phabricator') {
$response = CelerityAPI::getStaticResourceResponse(); $response = CelerityAPI::getStaticResourceResponse();
$response->initBehavior($behavior, $config);
$response->initBehavior($behavior, $config, $source_name);
} }
} }