You are here

TestHelpTopicPlugin.php in Drupal 8

File

core/modules/help_topics/tests/modules/help_topics_test/src/Plugin/HelpTopic/TestHelpTopicPlugin.php
View source
<?php

namespace Drupal\help_topics_test\Plugin\HelpTopic;

use Drupal\Core\Cache\Cache;
use Drupal\help_topics\HelpTopicPluginBase;

/**
 * A fake help topic plugin for testing.
 */
class TestHelpTopicPlugin extends HelpTopicPluginBase {

  /**
   * {@inheritdoc}
   */
  public function getBody() {
    return [
      '#type' => 'markup',
      '#markup' => $this->pluginDefinition['body'],
    ];
  }

  /**
   * {@inheritdoc}
   */
  public function getCacheContexts() {
    return [];
  }

  /**
   * {@inheritdoc}
   */
  public function getCacheTags() {
    return [
      'foobar',
    ];
  }

  /**
   * {@inheritdoc}
   */
  public function getCacheMaxAge() {
    return Cache::PERMANENT;
  }

}

Classes

Namesort descending Description
TestHelpTopicPlugin A fake help topic plugin for testing.