[ Index ] |
PHP Cross Reference of phpBB-3.3.14-deutsch |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * @package s9e\TextFormatter 5 * @copyright Copyright (c) 2010-2022 The s9e authors 6 * @license http://www.opensource.org/licenses/mit-license.php The MIT License 7 */ 8 namespace s9e\TextFormatter\Configurator\RulesGenerators; 9 10 use s9e\TextFormatter\Configurator\Helpers\TemplateInspector; 11 use s9e\TextFormatter\Configurator\RulesGenerators\Interfaces\BooleanRulesGenerator; 12 13 class ManageParagraphs implements BooleanRulesGenerator 14 { 15 /** 16 * @var TemplateInspector 17 */ 18 protected $p; 19 20 /** 21 * Constructor 22 * 23 * Prepares the TemplateInspector for <p/> 24 */ 25 public function __construct() 26 { 27 $this->p = new TemplateInspector('<p><xsl:apply-templates/></p>'); 28 } 29 30 /** 31 * {@inheritdoc} 32 */ 33 public function generateBooleanRules(TemplateInspector $src) 34 { 35 $rules = []; 36 37 if ($src->allowsChild($this->p) && $src->isBlock() && !$this->p->closesParent($src)) 38 { 39 $rules['createParagraphs'] = true; 40 } 41 42 if ($src->closesParent($this->p)) 43 { 44 $rules['breakParagraph'] = true; 45 } 46 47 return $rules; 48 } 49 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Mon Nov 25 19:05:08 2024 | Cross-referenced by PHPXref 0.7.1 |