[ Index ]

PHP Cross Reference of phpBB-3.3.14-deutsch

title

Body

[close]

/vendor/s9e/text-formatter/src/Configurator/Items/ -> TemplateDocument.php (source)

   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\Items;
   9  
  10  use s9e\SweetDOM\Document;
  11  use s9e\TextFormatter\Configurator\Helpers\TemplateLoader;
  12  
  13  class TemplateDocument extends Document
  14  {
  15      /**
  16      * @var Template Template instance that created this document
  17      */
  18      protected $template;
  19  
  20      /**
  21      * Constructor
  22      *
  23      * @param Template Template instance that created this document
  24      */
  25  	public function __construct(Template $template)
  26      {
  27          parent::__construct();
  28  
  29          $this->template = $template;
  30      }
  31  
  32      /**
  33      * Update the original template with this document's content
  34      *
  35      * @return void
  36      */
  37  	public function saveChanges()
  38      {
  39          $this->template->setContent(TemplateLoader::save($this));
  40      }
  41  }


Generated: Mon Nov 25 19:05:08 2024 Cross-referenced by PHPXref 0.7.1