2011-04-14 00:15:48 +02:00
|
|
|
<?php
|
|
|
|
|
2014-07-23 02:03:09 +02:00
|
|
|
final class PhabricatorMacroApplication extends PhabricatorApplication {
|
2011-04-14 00:15:48 +02:00
|
|
|
|
2012-10-01 23:04:03 +02:00
|
|
|
public function getBaseURI() {
|
|
|
|
return '/macro/';
|
2011-04-14 00:15:48 +02:00
|
|
|
}
|
|
|
|
|
2014-07-23 15:52:50 +02:00
|
|
|
public function getName() {
|
|
|
|
return pht('Macro');
|
|
|
|
}
|
|
|
|
|
2012-10-01 23:04:03 +02:00
|
|
|
public function getShortDescription() {
|
2013-01-24 04:36:23 +01:00
|
|
|
return pht('Image Macros and Memes');
|
2012-10-01 23:04:03 +02:00
|
|
|
}
|
2011-04-14 00:15:48 +02:00
|
|
|
|
2016-01-28 17:40:22 +01:00
|
|
|
public function getIcon() {
|
2015-01-26 21:44:43 +01:00
|
|
|
return 'fa-file-image-o';
|
2015-01-25 08:41:43 +01:00
|
|
|
}
|
|
|
|
|
2012-10-01 23:04:03 +02:00
|
|
|
public function getTitleGlyph() {
|
|
|
|
return "\xE2\x9A\x98";
|
|
|
|
}
|
2011-04-14 00:15:48 +02:00
|
|
|
|
2012-10-04 00:46:19 +02:00
|
|
|
public function getApplicationGroup() {
|
|
|
|
return self::GROUP_UTILITIES;
|
|
|
|
}
|
2013-08-02 21:56:58 +02:00
|
|
|
|
2012-10-01 23:04:03 +02:00
|
|
|
public function getRoutes() {
|
|
|
|
return array(
|
|
|
|
'/macro/' => array(
|
2013-05-30 23:09:37 +02:00
|
|
|
'(query/(?P<key>[^/]+)/)?' => 'PhabricatorMacroListController',
|
Modernize Macro application
Summary: Adds feed, email, notifications, comments, partial editing, subscriptions, enable/disable, flags and crumbs to Macro.
Test Plan:
{F26839}
{F26840}
{F26841}
{F26842}
{F26843}
{F26844}
{F26845}
Reviewers: vrana, btrahan, chad
Reviewed By: vrana
CC: aran
Maniphest Tasks: T2157, T175, T2104
Differential Revision: https://secure.phabricator.com/D4141
2012-12-11 23:01:03 +01:00
|
|
|
'create/' => 'PhabricatorMacroEditController',
|
|
|
|
'view/(?P<id>[1-9]\d*)/' => 'PhabricatorMacroViewController',
|
|
|
|
'comment/(?P<id>[1-9]\d*)/' => 'PhabricatorMacroCommentController',
|
|
|
|
'edit/(?P<id>[1-9]\d*)/' => 'PhabricatorMacroEditController',
|
2013-09-28 01:01:37 +02:00
|
|
|
'audio/(?P<id>[1-9]\d*)/' => 'PhabricatorMacroAudioController',
|
Modernize Macro application
Summary: Adds feed, email, notifications, comments, partial editing, subscriptions, enable/disable, flags and crumbs to Macro.
Test Plan:
{F26839}
{F26840}
{F26841}
{F26842}
{F26843}
{F26844}
{F26845}
Reviewers: vrana, btrahan, chad
Reviewed By: vrana
CC: aran
Maniphest Tasks: T2157, T175, T2104
Differential Revision: https://secure.phabricator.com/D4141
2012-12-11 23:01:03 +01:00
|
|
|
'disable/(?P<id>[1-9]\d*)/' => 'PhabricatorMacroDisableController',
|
2013-01-20 03:43:35 +01:00
|
|
|
'meme/' => 'PhabricatorMacroMemeController',
|
2013-01-22 03:46:04 +01:00
|
|
|
'meme/create/' => 'PhabricatorMacroMemeDialogController',
|
2012-10-01 23:04:03 +02:00
|
|
|
),
|
|
|
|
);
|
2011-04-14 00:15:48 +02:00
|
|
|
}
|
|
|
|
|
2014-06-25 06:56:34 +02:00
|
|
|
public function getRemarkupRules() {
|
|
|
|
return array(
|
2014-08-04 16:55:43 +02:00
|
|
|
new PhabricatorIconRemarkupRule(),
|
2014-09-29 17:31:00 +02:00
|
|
|
new PhabricatorEmojiRemarkupRule(),
|
2014-06-25 06:56:34 +02:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2013-10-16 19:35:52 +02:00
|
|
|
protected function getCustomCapabilities() {
|
|
|
|
return array(
|
2014-07-25 00:20:39 +02:00
|
|
|
PhabricatorMacroManageCapability::CAPABILITY => array(
|
2014-07-23 02:03:09 +02:00
|
|
|
'caption' => pht('Allows creating and editing macros.'),
|
2013-10-16 19:35:52 +02:00
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2015-04-01 20:01:21 +02:00
|
|
|
public function getMailCommandObjects() {
|
|
|
|
return array(
|
|
|
|
'macro' => array(
|
|
|
|
'name' => pht('Email Commands: Macros'),
|
|
|
|
'header' => pht('Interacting with Macros'),
|
|
|
|
'object' => new PhabricatorFileImageMacro(),
|
|
|
|
'summary' => pht(
|
|
|
|
'This page documents the commands you can use to interact with '.
|
|
|
|
'image macros.'),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2012-10-01 23:04:03 +02:00
|
|
|
}
|