Verzeichnisstruktur phpBB-3.3.16


Veröffentlicht
27.04.2026

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

Configurator.php

Zuletzt modifiziert: 01.05.2026, 11:28 - Dateigröße: 1.99 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\PipeTables;
 09   
 10  use s9e\TextFormatter\Configurator\Items\AttributeFilters\ChoiceFilter;
 11  use s9e\TextFormatter\Plugins\ConfiguratorBase;
 12   
 13  class Configurator extends ConfiguratorBase
 14  {
 15      /**
 16      * {@inheritdoc}
 17      */
 18      protected $quickMatch = '|';
 19   
 20      /**
 21      * Create the tags used by this plugin
 22      *
 23      * @return void
 24      */
 25      protected function setUp()
 26      {
 27          $tags = [
 28              'TABLE' => ['template' => '<table><xsl:apply-templates/></table>'],
 29              'TBODY' => ['template' => '<tbody><xsl:apply-templates/></tbody>'],
 30              'TD'    => $this->generateCellTagConfig('td'),
 31              'TH'    => $this->generateCellTagConfig('th'),
 32              'THEAD' => ['template' => '<thead><xsl:apply-templates/></thead>'],
 33              'TR'    => ['template' => '<tr><xsl:apply-templates/></tr>']
 34          ];
 35          foreach ($tags as $tagName => $tagConfig)
 36          {
 37              if (!isset($this->configurator->tags[$tagName]))
 38              {
 39                  $this->configurator->tags->add($tagName, $tagConfig);
 40              }
 41          }
 42      }
 43   
 44      /**
 45      * Generate the tag config for give cell element
 46      *
 47      * @param  string $elName Element's name, either "td" or "th"
 48      * @return array          Tag config
 49      */
 50      protected function generateCellTagConfig($elName)
 51      {
 52          $alignFilter = new ChoiceFilter(['left', 'center', 'right', 'justify'], true);
 53   
 54          return [
 55              'attributes' => [
 56                  'align' => [
 57                      'filterChain' => ['strtolower', $alignFilter],
 58                      'required' => false
 59                  ]
 60              ],
 61              'rules' => ['createParagraphs' => false],
 62              'template' =>
 63                  '<' . $elName . '>
 64                      <xsl:if test="@align">
 65                          <xsl:attribute name="style">text-align:<xsl:value-of select="@align"/></xsl:attribute>
 66                      </xsl:if>
 67                      <xsl:apply-templates/>
 68                  </' . $elName . '>'
 69          ];
 70      }
 71   
 72      /**
 73      * {@inheritdoc}
 74      */
 75      public function asConfig()
 76      {
 77          return [
 78              'overwriteEscapes'  => isset($this->configurator->Escaper),
 79              'overwriteMarkdown' => isset($this->configurator->Litedown)
 80          ];
 81      }
 82  }