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

Iframe.php

Zuletzt modifiziert: 02.04.2025, 15:04 - Dateigröße: 1.28 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\MediaEmbed\Configurator\TemplateGenerators;
09   
10  use s9e\TextFormatter\Plugins\MediaEmbed\Configurator\TemplateGenerator;
11   
12  class Iframe extends TemplateGenerator
13  {
14      /**
15      * @var array Default iframe attributes
16      */
17      protected $defaultIframeAttributes = [
18          'allowfullscreen' => '',
19          'loading'         => 'lazy',
20          'scrolling'       => 'no',
21          'style'           => ['border' => '0']
22      ];
23   
24      /**
25      * @var string[] List of attributes to be passed to the iframe
26      */
27      protected $iframeAttributes = ['allow', 'data-s9e-livepreview-ignore-attrs', 'data-s9e-livepreview-onrender', 'onload', 'scrolling', 'src', 'style'];
28   
29      /**
30      * {@inheritdoc}
31      */
32      protected function getContentTemplate()
33      {
34          $attributes = $this->mergeAttributes($this->defaultIframeAttributes, $this->getFilteredAttributes());
35   
36          return '<iframe>' . $this->generateAttributes($attributes) . '</iframe>';
37      }
38   
39      /**
40      * Filter the attributes to keep only those that can be used in an iframe
41      *
42      * @return array
43      */
44      protected function getFilteredAttributes()
45      {
46          return array_intersect_key($this->attributes, array_flip($this->iframeAttributes));
47      }
48  }