Verzeichnisstruktur phpBB-3.2.0
- Veröffentlicht
- 06.01.2017
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. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
Configurator.php
01 <?php
02
03 /*
04 * @package s9e\TextFormatter
05 * @copyright Copyright (c) 2010-2016 The s9e Authors
06 * @license http://www.opensource.org/licenses/mit-license.php The MIT License
07 */
08 namespace s9e\TextFormatter\Plugins\PipeTables;
09 use s9e\TextFormatter\Configurator\Items\AttributeFilters\ChoiceFilter;
10 use s9e\TextFormatter\Plugins\ConfiguratorBase;
11 class Configurator extends ConfiguratorBase
12 {
13 protected $quickMatch = '|';
14 protected function setUp()
15 {
16 $tags = array(
17 'TABLE' => array('template' => '<table><xsl:apply-templates/></table>'),
18 'TBODY' => array('template' => '<tbody><xsl:apply-templates/></tbody>'),
19 'TD' => $this->generateCellTagConfig('td'),
20 'TH' => $this->generateCellTagConfig('th'),
21 'THEAD' => array('template' => '<thead><xsl:apply-templates/></thead>'),
22 'TR' => array('template' => '<tr><xsl:apply-templates/></tr>')
23 );
24 foreach ($tags as $tagName => $tagConfig)
25 if (!isset($this->configurator->tags[$tagName]))
26 $this->configurator->tags->add($tagName, $tagConfig);
27 }
28 protected function generateCellTagConfig($elName)
29 {
30 $alignFilter = new ChoiceFilter(array('left', 'center', 'right', 'justify'), \true);
31 return array(
32 'attributes' => array(
33 'align' => array(
34 'filterChain' => array('strtolower', $alignFilter),
35 'required' => \false
36 )
37 ),
38 'rules' => array('createParagraphs' => \false),
39 'template' =>
40 '<' . $elName . '>
41 <xsl:if test="@align">
42 <xsl:attribute name="style">text-align:<xsl:value-of select="@align"/></xsl:attribute>
43 </xsl:if>
44 <xsl:apply-templates/>
45 </' . $elName . '>'
46 );
47 }
48 public function asConfig()
49 {
50 return array(
51 'overwriteEscapes' => isset($this->configurator->Escaper),
52 'overwriteMarkdown' => isset($this->configurator->Litedown)
53 );
54 }
55 }