DiffFormatter::__construct

public DiffFormatter::__construct(ConfigFactoryInterface $config_factory)

Creates a DiffFormatter to render diffs in a table.

Parameters

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory.

File

core/lib/Drupal/Core/Diff/DiffFormatter.php, line 38

Class

DiffFormatter
Diff formatter which uses returns output that can be rendered to a table.

Namespace

Drupal\Core\Diff

Code

public function __construct(ConfigFactoryInterface $config_factory) {
  $config = $config_factory->get('system.diff');
  $this->leading_context_lines = $config->get('context.lines_leading');
  $this->trailing_context_lines = $config->get('context.lines_trailing');
}
doc_Drupal
2016-10-29 09:02:27
Comments
Leave a Comment

Please login to continue.