Created
January 19, 2016 18:26
-
-
Save leonrenkema/dbbb6eba83647b78caa8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Drupal\hello\Plugin\Block; | |
use Drupal\Core\Block\BlockBase; | |
/** | |
* Class HelloBlock | |
* @package Drupal\hello\Plugin\Block | |
* | |
* @Block( | |
* id = "leon_hello_block", | |
* admin_label = @Translation("Leon's hello block"), | |
* category = @Translation("Leon") | |
* ) | |
*/ | |
class HelloBlock extends BlockBase { | |
/** | |
* Builds and returns the renderable array for this block plugin. | |
* | |
* @return array | |
* A renderable array representing the content of the block. | |
* | |
* @see \Drupal\block\BlockViewBuilder | |
*/ | |
public function build() | |
{ | |
return array( | |
'#title' => 'Hello world!', | |
'#markup' => 'This is the content' | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment