mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-19 12:00:55 +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:
parent
000760b645
commit
5b490e98d8
2 changed files with 8 additions and 3 deletions
|
@ -40,7 +40,7 @@ final class CelerityStaticResourceResponse {
|
|||
public function initBehavior(
|
||||
$behavior,
|
||||
array $config = array(),
|
||||
$source_name = 'phabricator') {
|
||||
$source_name) {
|
||||
|
||||
$this->requireResource('javelin-behavior-'.$behavior, $source_name);
|
||||
|
||||
|
|
|
@ -2,9 +2,14 @@
|
|||
|
||||
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->initBehavior($behavior, $config);
|
||||
|
||||
$response->initBehavior($behavior, $config, $source_name);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue