Created
October 30, 2014 02:17
-
-
Save mkorostoff/3dfd490c65ace4aba873 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
| /** | |
| * @file | |
| * Contains \Drupal\yourmodule\Plugin\Block\YourBlockName. | |
| */ | |
| namespace Drupal\yourmodule\Plugin\Block; | |
| use Drupal\Core\Block\BlockBase; | |
| /** | |
| * Provides my custom block. | |
| * | |
| * @Block( | |
| * id = "my_custom_block", | |
| * admin_label = @Translation("My Custom Block"), | |
| * category = @Translation("Blocks") | |
| * ) | |
| */ | |
| class YourBlockName extends BlockBase { | |
| /** | |
| * {@inheritdoc} | |
| */ | |
| public function build() { | |
| return array('#markup' => 'hello world'); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment