HelpSectionPluginBase.php

Same filename in other branches
  1. 9 core/modules/help/src/Plugin/HelpSection/HelpSectionPluginBase.php
  2. 10 core/modules/help/src/Plugin/HelpSection/HelpSectionPluginBase.php
  3. 11.x core/modules/help/src/Plugin/HelpSection/HelpSectionPluginBase.php

Namespace

Drupal\help\Plugin\HelpSection

File

core/modules/help/src/Plugin/HelpSection/HelpSectionPluginBase.php

View source
<?php

namespace Drupal\help\Plugin\HelpSection;

use Drupal\Core\Cache\UnchangingCacheableDependencyTrait;
use Drupal\Core\Plugin\PluginBase;
use Drupal\help\HelpSectionPluginInterface;

/**
 * Provides a base class for help section plugins.
 *
 * @see \Drupal\help\HelpSectionPluginInterface
 * @see \Drupal\help\Annotation\HelpSection
 * @see \Drupal\help\HelpSectionManager
 */
abstract class HelpSectionPluginBase extends PluginBase implements HelpSectionPluginInterface {
    use UnchangingCacheableDependencyTrait;
    
    /**
     * {@inheritdoc}
     */
    public function getTitle() {
        return $this->getPluginDefinition()['title'];
    }
    
    /**
     * {@inheritdoc}
     */
    public function getDescription() {
        return $this->getPluginDefinition()['description'];
    }

}

Classes

Title Deprecated Summary
HelpSectionPluginBase Provides a base class for help section plugins.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.