Bonjour,

j'apprends drupal 8, je suis un tutoriel et j'ai un soucis avec le développement d'un bloc en effet il n'est pas détecté.
modules\custom\hello_world\src\Plugin\Block\HelloWorldBlock.php

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
 
<?php
/<strong>
 * Provides a 'Hello' Block
 *
 * @Block(
 *   id = "hello_block",
 *   admin_label = @Translation("Hello block"),
 * )
 */
namespace Drupal\hello_world\Plugin\Block;
use Drupal\Core\Block\BlockBase;
class HelloWorldBlock extends BlockBase {
    /</strong>
     * {@inheritdoc}
     */
    public function build() {
        return array(
            '#markup' => $this->t('Hello, World!'),
        );
    }
}
?>

ensuite je fais structure->mise en place->placer block
et je ne vois pas apparaître mon bloc "hello_block" dans la liste