Pathologic was missing because of a .git folder inside.
[yaffs-website] / web / modules / contrib / pathologic / src / PathologicSettingsCommon.php
1 <?php
2
3 namespace Drupal\pathologic;
4
5 use Drupal\Core\StringTranslation\StringTranslationTrait;
6
7 class PathologicSettingsCommon {
8
9   use StringTranslationTrait;
10
11   /**
12    * Common elements for the Pathologic configuration form.
13    *
14    * This reduces redundancy in code for form elements that will appear on both
15    * the global settings form and the per-format filter settings form.
16    *
17    * @param array $defaults
18    *   An array of default values for the configuration form fields.
19    * @return
20    *   The common form elements
21    */
22   public function commonSettingsForm(array $defaults) {
23     return [
24       'protocol_style' => [
25         '#type' => 'radios',
26         '#title' => $this->t('Processed URL format'),
27         '#default_value' => $defaults['protocol_style'],
28         '#options' => [
29           'full' => $this->t('Full URL (<code>http://example.com/foo/bar</code>)'),
30           'proto-rel' => $this->t('Protocol relative URL (<code>//example.com/foo/bar</code>)'),
31           'path' => $this->t('Path relative to server root (<code>/foo/bar</code>)'),
32         ],
33         '#description' => t('The <em>Full URL</em> option is best for stopping broken images and links in syndicated content (such as in RSS feeds), but will likely lead to problems if your site is accessible by both HTTP and HTTPS. Paths output with the <em>Protocol relative URL</em> option will avoid such problems, but feed readers and other software not using up-to-date standards may be confused by the paths. The <em>Path relative to server root</em> option will avoid problems with sites accessible by both HTTP and HTTPS with no compatibility concerns, but will absolutely not fix broken images and links in syndicated content.'),
34         '#weight' => 10,
35       ],
36       'local_paths' => [
37         '#type' => 'textarea',
38         '#title' =>  $this->t('All base paths for this site'),
39         '#default_value' => $defaults['local_paths'],
40           '#description' => $this->t('If this site is or was available at more than one base path or URL, enter them here, separated by line breaks. For example, if this site is live at <code>http://example.com/</code> but has a staging version at <code>http://dev.example.org/staging/</code>, you would enter both those URLs here. If confused, please read <a href=":docs" target="_blank">Pathologic&rsquo;s documentation</a> for more information about this option and what it affects.', [':docs' => 'https://www.drupal.org/node/257026']),
41         '#weight' => 20,
42       ],
43     ];
44   }
45   
46 }