Pathologic was missing because of a .git folder inside.
[yaffs-website] / web / modules / contrib / diff / src / DiffFormatter.php
1 <?php
2
3 namespace Drupal\diff;
4
5 use Drupal\Core\Diff\DiffFormatter as CoreDiffFormatterBase;
6 use Drupal\Core\Config\ConfigFactoryInterface;
7
8 /**
9  * Diff formatter which returns output that can be rendered to a table.
10  */
11 class DiffFormatter extends CoreDiffFormatterBase {
12
13   /**
14    * Creates a DiffFormatter to render diffs in a table.
15    *
16    * We need to extend the constructor of the diff formatter used by the
17    * core config system in order to provide our own settings.
18    *
19    * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
20    *   The config factory.
21    */
22   public function __construct(ConfigFactoryInterface $config_factory) {
23     parent::__construct($config_factory);
24
25     $config = $config_factory->get('diff.settings');
26     $this->leading_context_lines = $config->get('general_settings.context_lines_leading');
27     $this->trailing_context_lines = $config->get('general_settings.context_lines_trailing');
28   }
29
30 }