I create a Block Plugin in a module, it be showing the available blocks but when I try to place the block, it returns in the browser console the follow error:
AjaxError: An AJAX HTTP error occurred. HTTP-resultaatcode: 500 Debug informatie volgt. Pad: /admin/structure/block/add/hello_block/bartik?region=footer_fourth Statustekst: Internal Server Error Antwoordtekst:
I have place the code on the follow place: DrupalRoot/modules/pagebuilder/src/Plugin/Block/testblock.php
<?php
/**
* @file
* Contains \Drupal\pagebuilder\Plugin\Block\testblock.
*/
namespace Drupal\pagebuilder\Plugin\Block
use Drupal\Core\Block\BlockBase;
/**
* Provides a 'Hello' Block
*
* @Block(
* id = "hello_block",
* admin_label = @Translation("Hello block"),
* )
*/
class testblock extends BlockBase {
/**
* {@inheritdoc}
*/
public function build() {
return array(
'#markup' => $this->t('Hello, World!'),
);
}
}
?>
How can i fix this problem?