I am overwriting the CommentBulkForm
class in my module.
namespace Drupal\mymod\Plugin\views\field;
use Drupal\comment\Plugin\views\field\CommentBulkForm;
/**
* Defines a custom comment operations bulk form element.
*
* @ViewsField("custom_comment_bulk_form")
*/
class CustomCommentBulkForm extends CommentBulkForm {
/**
* {@inheritdoc}
*/
protected function emptySelectedMessage() {
return $this->t('some other message.');
}
}
This file is placed inside mymodule\src\Plugin\views\field. I overwrote the views.view.comment to look for this class. However, I get the following error when I try to load the comments view.
Drupal\Component\Plugin\Exception\PluginException: Plugin (custom_comment_bulk_form) instance class "Drupal\mymod\Plugin\views\field\custom_comment_bulk_form" does not exist. in Drupal\Component\Plugin\Factory\DefaultFactory::getPluginClass() (line 97 of /vagrant/web/core/lib/Drupal/Component/Plugin/Factory/DefaultFactory.php).
What's wrong in the code?