1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-04-11 03:48:34 +02:00
phorge-phorge/src/applications/dashboard/icon/PhabricatorDashboardIconSet.php
Chad Little 26127b9c5f Allow Dashboards to set an icon
Summary: Allows users set an icon (for reuse on upcoming home) for their dashboard based on 16 descriminating choices.

Test Plan: Create a new dashboard, set new icon. Edit an existing dashboard, set icon.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D17042
2016-12-13 11:30:22 -08:00

45 lines
1.1 KiB
PHP

<?php
final class PhabricatorDashboardIconSet
extends PhabricatorIconSet {
const ICONSETKEY = 'dashboards';
public function getSelectIconTitleText() {
return pht('Choose Dashboard Icon');
}
protected function newIcons() {
$map = array(
'fa-home' => pht('Home'),
'fa-th-large' => pht('Blocks'),
'fa-columns' => pht('Columns'),
'fa-bookmark' => pht('Page Saver'),
'fa-book' => pht('Knowledge'),
'fa-bomb' => pht('Kaboom'),
'fa-pie-chart' => pht('Apple Blueberry'),
'fa-bar-chart' => pht('Serious Business'),
'fa-bell' => pht('Ding Ding'),
'fa-credit-card' => pht('Plastic Debt'),
'fa-code' => pht('PHP is Life'),
'fa-sticky-note' => pht('To Self'),
'fa-newspaper-o' => pht('Stay Woke'),
'fa-server' => pht('Metallica'),
'fa-hashtag' => pht('Corned Beef'),
'fa-group' => pht('Triplets'),
);
$icons = array();
foreach ($map as $key => $label) {
$icons[] = id(new PhabricatorIconSetIcon())
->setKey($key)
->setLabel($label);
}
return $icons;
}
}