Verzeichnisstruktur phpBB-3.3.15


Veröffentlicht
28.08.2024

So funktioniert es


Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück

Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis.
Auf den Verzeichnisnamen klicken, dies zeigt nur das Verzeichnis mit Inhalt an

(Beispiel Datei-Icons)

Auf das Icon klicken um den Quellcode anzuzeigen

EmoticonCollection.php

Zuletzt modifiziert: 02.04.2025, 15:04 - Dateigröße: 1.13 KiB


01  <?php
02   
03  /**
04  * @package   s9e\TextFormatter
05  * @copyright Copyright (c) 2010-2022 The s9e authors
06  * @license   http://www.opensource.org/licenses/mit-license.php The MIT License
07  */
08  namespace s9e\TextFormatter\Plugins\Emoticons\Configurator;
09   
10  use RuntimeException;
11  use s9e\TextFormatter\Configurator\Collections\NormalizedCollection;
12  use s9e\TextFormatter\Configurator\Helpers\TemplateLoader;
13   
14  class EmoticonCollection extends NormalizedCollection
15  {
16      /**
17      * {@inheritdoc}
18      */
19      protected $onDuplicateAction = 'replace';
20   
21      /**
22      * Normalize an emoticon's template
23      *
24      * NOTE: this allows the HTML syntax to be used for individual emoticons
25      *
26      * @param  string $value Emoticon's original markup
27      * @return string        Normalized template
28      */
29      public function normalizeValue($value)
30      {
31          return TemplateLoader::save(TemplateLoader::load($value));
32      }
33   
34      /**
35      * {@inheritdoc}
36      */
37      protected function getAlreadyExistsException($key)
38      {
39          return new RuntimeException("Emoticon '" . $key . "' already exists");
40      }
41   
42      /**
43      * {@inheritdoc}
44      */
45      protected function getNotExistException($key)
46      {
47          return new RuntimeException("Emoticon '" . $key . "' does not exist");
48      }
49  }