localizer = $localizer; $this->isPinned = $featureManager->isFeatureEnabled( Constants::FEATURE_CLIENT_PREFS_PINNED ); } /** * @inheritDoc */ public function getTemplateData(): array { $pinnedContainer = new VectorComponentPinnableContainer( self::ID, $this->isPinned ); $pinnableElement = new VectorComponentPinnableElement( self::ID ); $pinnableHeader = new VectorComponentPinnableHeader( $this->localizer, $this->isPinned, // Name self::ID, // Feature name 'client-prefs-pinned' ); $data = $pinnableElement->getTemplateData() + $pinnedContainer->getTemplateData(); return $data + [ 'data-pinnable-header' => $pinnableHeader->getTemplateData() ]; } }