getUser(); $this->toolbox = $toolbox; $this->actionsMenu = $actionsMenu; $this->isPinned = $isPinned; $this->pinnableHeader = $user->isRegistered() ? new VectorComponentPinnableHeader( $skin->getContext(), $isPinned, // Name 'vector-page-tools', // Feature name 'page-tools-pinned' ) : null; $this->skin = $skin; } /** * @inheritDoc */ public function getTemplateData(): array { $menusData = [ $this->toolbox, $this->actionsMenu ]; $pinnableDropdownData = [ 'id' => 'vector-page-tools', 'class' => 'vector-page-tools', 'label' => $this->skin->msg( 'toolbox' ), 'is-pinned' => $this->isPinned, 'has-multiple-menus' => true, 'data-pinnable-header' => $this->pinnableHeader ? $this->pinnableHeader->getTemplateData() : null, 'data-menus' => $menusData ]; return $pinnableDropdownData; } }