You are here

public function PageProcessor::__construct in Mini site 8

PageProcessor constructor.

Parameters

string $content: Content to process.

\Drupal\minisite\UrlBag $url_bag: A container for all URL used for the replacement of links. Usually, based on current path where document is accessed from.

Throws

\Drupal\minisite\Exception\PageProcessorException If the provided content cannot be parsed into \DOMDocument.

File

src/PageProcessor.php, line 43

Class

PageProcessor
Class PageProcessor.

Namespace

Drupal\minisite

Code

public function __construct($content, UrlBag $url_bag) {
  $this->urlBag = $url_bag;
  $this->document = $this
    ->loadDocument($content);
}