You are here

public function TypesInfoEvent::setType in Charts 5.0.x

Same name and namespace in other branches
  1. 8.4 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;
}