name = $name; $this->component = [ 'text' => $text, 'href' => $url, 'class' => MinervaUI::iconClass( $iconName ?? $name, $iconType, $classes ), ]; if ( $trackClicks !== false ) { $eventName = $trackClicks === true ? $name : $trackClicks; if ( $eventName ) { $this->component['data-event-name'] = 'menu.' . $eventName; } } } /** * @inheritDoc */ public function getName() { return $this->name; } /** * @inheritDoc */ public function getCSSClasses(): array { return []; } /** * @inheritDoc */ public function getComponents(): array { return [ $this->component ]; } }