1. Placing blocks for the first time
Disabled blocks do not appear in the disabled blocks section of the blocks admin page.
On the bottom of the page
Disabled (Place block)
2 Code Sometimes has to go in Comments
I am somewhat disturbed by the idea that some of the code should be contained in comments. (E.g. the FilterBase class has the default settings for a new filter instance in the header comments). I understand that this is necessary because of the limitations of the expressiveness of the language, but I feel that comments should be comments, even though it might be a good idea to standardize the formatting to help readability and automatic documentation tools.
3. Very complex code to create links
Drupal 7 links solution
'#markup' => t('For more info, see the ') . l(t(information page', '/information'), or '#markup' => t('For more info, see the @information_page', array( '@information_page' => l(t(information page', '/information'), ) ),
Drupal 8 links solution
use Drupal\Core\Url; use Drupal\Core\Link; $sample_url_obj = Url::fromUri('/information); // or if route available: Url::fromRoute('sample.information'); $sample_link_obj = Link::fromTextAndUrl($this->t('sample sub page'), $sample_url_obj); '#markup' => t('For more info, see the @information_page', array( '@information_page' => \Drupal::service('renderer')->render($sample_sub_link_obj->toRenderable()), ) ),