You are here

public function NodeNid::getValues in ThemeKey 8

Return value

array array of drupal:route_name values

Overrides PropertyInterface::getValues

File

src/Plugin/Property/NodeNid.php, line 28
Contains \Drupal\themekey\Plugin\Property\DrupalRouteName.

Class

NodeNid
Provides a 'node id' property.

Namespace

Drupal\themekey\Plugin\Property

Code

public function getValues() {
  $node = $this
    ->getRouteMatch()
    ->getParameter('node');
  return is_null($node) ?: array(
    $node
      ->get('nid')->value,
  );
}