On Github slashrsm / d8_plugins_session
Replaces hook_X_info()
- parses file and stores info about all plugins - caches - files go from memory after parse - not true if you include .php /**
* Displays some text as a tip.
*
* @Tip(
* id = "text",
* title = @Translation("Text")
* )
*/
class TipPluginText ...
/**
* Provides a 'Powered by Drupal' block.
*
* @Plugin(
* id = "system_powered_by_block",
* admin_label = @Translation("Powered by Drupal"),
* module = "system"
* )
*/
class SystemPoweredByBlock ...
/**
* Provides a filter to convert URLs into links.
*
* @Filter(
* id = "filter_url",
* module = "filter",
* title = @Translation("Convert URLs into links"),
* type = FILTER_TYPE_MARKUP_LANGUAGE,
* settings = {
* "filter_url_length" = 72
* }
* )
*/
class FilterUrl ...
Let's port very simple block from D7 to D8. Meet Pants module!