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;
class TestHelpTopicPlugin extends HelpTopicPluginBase {
public function getBody() {
return [
'#type' => 'markup',
'#markup' => $this->pluginDefinition['body'],
];
}
public function getCacheContexts() {
return [];
}
public function getCacheTags() {
return [
'foobar',
];
}
public function getCacheMaxAge() {
return Cache::PERMANENT;
}
}