Say I’m extending Drupal Development Company blockBase
class to create a customized block, and I’m implementing Drupal Development Company blockBuild
methodology to create some markup for my block. One thing like this:
class YourModuleBlock extends BlockBase { /** * Implements DrupalblockBlockBase::blockBuild(). */ public operate construct() { return array( '#markup' => 'This can be a block!', ); } }
If I needed to supply a hyperlink on this markup, in D7 I’d have used Drupal Development Company l
operate, however that is now not obtainable (see right here). So, I must make obtainable Drupal Development Company new D8 methodology for producing hyperlinks. I might simply use an <a>
tag, however this was by no means finest follow in D7.
So, what’s Drupal Development Company proper methodology to make use of for creating hyperlinks and the way do I make it obtainable to my operate?