You are here

public function TypesInfoEvent::setType in Charts 8.4

Same name and namespace in other branches
  1. 5.0.x src/Event/TypesInfoEvent.php \Drupal\charts\Event\TypesInfoEvent::setType()

Sets a chart type information.

Parameters

string $type: The chart type name.

array $info: The chart type information settings.

Return value

$this

File

src/Event/TypesInfoEvent.php, line 75

Class

TypesInfoEvent
The TypesInfoEvent.

Namespace

Drupal\charts\Event

Code

public function setType($type, array $info) {
  if ($this
    ->getType($type)) {
    $this->types[$type] = $info;
  }
  return $this;
}