Add a PhabricatorApplication for files
Summary: Basic step toward modernizing Files, makes it appear on /applications/ and in typeahead. Test Plan: Looked at /applications/. Reviewers: btrahan, vrana Reviewed By: vrana CC: aran Differential Revision: https://secure.phabricator.com/D3575
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* Copyright 2012 Facebook, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
final class PhabricatorApplicationFiles extends PhabricatorApplication {
|
||||
|
||||
public function getBaseURI() {
|
||||
return '/file/';
|
||||
}
|
||||
|
||||
public function getShortDescription() {
|
||||
return 'Store and Share Files';
|
||||
}
|
||||
|
||||
public function getAutospriteName() {
|
||||
return 'files';
|
||||
}
|
||||
|
||||
public function getTitleGlyph() {
|
||||
return "\xE2\x87\xAA";
|
||||
}
|
||||
|
||||
public function getRoutes() {
|
||||
return array(
|
||||
'/F(?P<id>\d+)' => 'PhabricatorFileShortcutController',
|
||||
'/file/' => array(
|
||||
'' => 'PhabricatorFileListController',
|
||||
'filter/(?P<filter>\w+)/' => 'PhabricatorFileListController',
|
||||
'upload/' => 'PhabricatorFileUploadController',
|
||||
'dropupload/' => 'PhabricatorFileDropUploadController',
|
||||
'delete/(?P<id>\d+)/' => 'PhabricatorFileDeleteController',
|
||||
'info/(?P<phid>[^/]+)/' => 'PhabricatorFileInfoController',
|
||||
'data/(?P<key>[^/]+)/(?P<phid>[^/]+)/.*'
|
||||
=> 'PhabricatorFileDataController',
|
||||
'proxy/' => 'PhabricatorFileProxyController',
|
||||
'xform/(?P<transform>[^/]+)/(?P<phid>[^/]+)/'
|
||||
=> 'PhabricatorFileTransformController',
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user