You are here

public function PurlProvider::__construct in Persistent URL 8

Constructs a Plugin object.

Builds up the plugin definition and invokes the get() method for any classed annotations that were used.

Overrides Plugin::__construct

File

src/Annotation/PurlProvider.php, line 12

Class

PurlProvider

Namespace

Drupal\purl\Annotation

Code

public function __construct($values) {
  parent::__construct($values);
  if (!isset($this->definition['name'])) {
    $id = preg_replace('/([^a-zA-Z0-9])+/', ' ', $this->definition['id']);
    $this->definition['name'] = ucwords($id);
  }
}