Files
mautic-marketing-program-bu…/Service/Pictograms.php
T
Alexandre Gain ea88b7a772 refactor(plugin): rebrand as MT3SMarketingProgram, release 0.17.0
Rename the plugin's vendor/namespace from experiential/Program to mt3s/MT3SMarketingProgram (composer: mt3s/mautic-marketing-program-bundle):

- ProgramBundle -> MT3SMarketingProgramBundle; extension, integration,
  config support, permissions, events and twig extension renamed likewise
- Initiative* -> Program*: controller (InitiativeController ->
  ProgramController), model, entities, repositories, form types and views
  (new _tabs/_task_table/_tab_table_filter partials, details page)
- Settings config form theme -> _config_mt3smarketingprogramconfig_widget;
  routes and translations re-prefixed (mt3s_marketing_program_*)
- Assets: icon.svg -> mt3s-mp-icon.svg; program.js -> mt3s-mp-program.js
  (OnLoad hooks renamed mt3sMpProgram*)
- Add Command/RefreshStatsCommand; Migrations/Version_0_17_0.php renames
  the tables to mt3s_mp_program_*
2026-11-15 17:48:01 +01:00

65 lines
2.9 KiB
PHP

<?php
declare(strict_types=1);
namespace MauticPlugin\MT3SMarketingProgramBundle\Service;
/**
* Pictograms an administrator can give to an item type — description or allocation (Settings >
* Configuration > Program Settings). They are icons of the Remix Icon set that Mautic ships ("ri-*"
* classes); each one was checked against Mautic 7's icon stylesheet.
*/
final class Pictograms
{
public const ICONS = [
// Ideas, goals, guidance
'ri-lightbulb-line', 'ri-focus-3-line', 'ri-compass-3-line', 'ri-route-line', 'ri-flag-line',
'ri-rocket-line', 'ri-trophy-line', 'ri-award-line', 'ri-medal-line', 'ri-star-line',
'ri-sparkling-line', 'ri-magic-line', 'ri-key-2-line',
// Creative, style, tone
'ri-palette-line', 'ri-brush-line', 'ri-quill-pen-line', 'ri-pencil-line', 'ri-emotion-line',
'ri-emotion-happy-line', 'ri-heart-line', 'ri-thumb-up-line', 'ri-image-line', 'ri-camera-line',
'ri-video-line', 'ri-mic-line', 'ri-music-line', 'ri-layout-line', 'ri-pages-line',
'ri-presentation-line', 'ri-slideshow-line',
// Messages, content
'ri-chat-quote-line', 'ri-chat-3-line', 'ri-volume-up-line', 'ri-megaphone-line', 'ri-mail-line',
'ri-newspaper-line', 'ri-article-line', 'ri-file-text-line', 'ri-file-list-3-line',
'ri-book-open-line', 'ri-bookmark-line', 'ri-links-line',
// People, market
'ri-team-line', 'ri-group-line', 'ri-user-line', 'ri-user-heart-line', 'ri-customer-service-2-line',
'ri-hand-heart-line', 'ri-building-line', 'ri-briefcase-line', 'ri-store-2-line',
'ri-shopping-cart-line', 'ri-price-tag-3-line', 'ri-gift-line', 'ri-truck-line',
'ri-global-line', 'ri-earth-line', 'ri-map-pin-line',
// Figures, time
'ri-money-euro-circle-line', 'ri-wallet-3-line', 'ri-bar-chart-line', 'ri-pie-chart-line',
'ri-line-chart-line', 'ri-calendar-line', 'ri-time-line', 'ri-timer-line',
// Rules, status, structure
'ri-information-line', 'ri-question-line', 'ri-error-warning-line', 'ri-shield-check-line',
'ri-scales-3-line', 'ri-lock-line', 'ri-checkbox-circle-line', 'ri-list-check', 'ri-search-line',
'ri-eye-line', 'ri-tools-line', 'ri-settings-3-line', 'ri-stack-line', 'ri-node-tree', 'ri-leaf-line',
];
public static function isValid(?string $icon): bool
{
return null !== $icon && in_array($icon, self::ICONS, true);
}
/**
* Dropdown choices: readable name => icon class, e.g. "Lightbulb" => "ri-lightbulb-line".
*
* @return array<string, string>
*/
public static function getChoices(): array
{
$choices = [];
foreach (self::ICONS as $icon) {
$name = preg_replace(['/^ri-/', '/-line$/'], '', $icon);
$name = ucfirst(str_replace('-', ' ', (string) $name));
$choices[$name] = $icon;
}
return $choices;
}
}