Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
304
Merge Requests
304
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
0489b631
Commit
0489b631
authored
Aug 25, 2013
by
alexpott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#2065721
by tim.plunkett: Add a dedicated @Block plugin annotation.
parent
703e9e47
Changes
30
Hide whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
114 additions
and
107 deletions
+114
-107
core/modules/aggregator/lib/Drupal/aggregator/Plugin/Block/AggregatorCategoryBlock.php
...rupal/aggregator/Plugin/Block/AggregatorCategoryBlock.php
+2
-3
core/modules/aggregator/lib/Drupal/aggregator/Plugin/Block/AggregatorFeedBlock.php
...ib/Drupal/aggregator/Plugin/Block/AggregatorFeedBlock.php
+2
-3
core/modules/block/custom_block/lib/Drupal/custom_block/Plugin/Block/CustomBlockBlock.php
...lib/Drupal/custom_block/Plugin/Block/CustomBlockBlock.php
+2
-3
core/modules/block/lib/Drupal/block/Annotation/Block.php
core/modules/block/lib/Drupal/block/Annotation/Block.php
+35
-0
core/modules/block/lib/Drupal/block/Plugin/Type/BlockManager.php
...dules/block/lib/Drupal/block/Plugin/Type/BlockManager.php
+3
-1
core/modules/block/tests/modules/block_test/lib/Drupal/block_test/Plugin/Block/TestBlockInstantiation.php
...Drupal/block_test/Plugin/Block/TestBlockInstantiation.php
+3
-4
core/modules/block/tests/modules/block_test/lib/Drupal/block_test/Plugin/Block/TestCacheBlock.php
...est/lib/Drupal/block_test/Plugin/Block/TestCacheBlock.php
+3
-4
core/modules/block/tests/modules/block_test/lib/Drupal/block_test/Plugin/Block/TestHtmlIdBlock.php
...st/lib/Drupal/block_test/Plugin/Block/TestHtmlIdBlock.php
+3
-5
core/modules/block/tests/modules/block_test/lib/Drupal/block_test/Plugin/Block/TestXSSTitleBlock.php
.../lib/Drupal/block_test/Plugin/Block/TestXSSTitleBlock.php
+3
-4
core/modules/book/lib/Drupal/book/Plugin/Block/BookNavigationBlock.php
...book/lib/Drupal/book/Plugin/Block/BookNavigationBlock.php
+3
-4
core/modules/comment/lib/Drupal/comment/Plugin/Block/RecentCommentsBlock.php
...t/lib/Drupal/comment/Plugin/Block/RecentCommentsBlock.php
+3
-4
core/modules/forum/lib/Drupal/forum/Plugin/Block/ActiveTopicsBlock.php
...forum/lib/Drupal/forum/Plugin/Block/ActiveTopicsBlock.php
+3
-4
core/modules/forum/lib/Drupal/forum/Plugin/Block/NewTopicsBlock.php
...es/forum/lib/Drupal/forum/Plugin/Block/NewTopicsBlock.php
+3
-4
core/modules/language/lib/Drupal/language/Plugin/Block/LanguageBlock.php
...nguage/lib/Drupal/language/Plugin/Block/LanguageBlock.php
+2
-3
core/modules/menu/lib/Drupal/menu/Plugin/Block/MenuBlock.php
core/modules/menu/lib/Drupal/menu/Plugin/Block/MenuBlock.php
+2
-3
core/modules/node/lib/Drupal/node/Plugin/Block/RecentContentBlock.php
.../node/lib/Drupal/node/Plugin/Block/RecentContentBlock.php
+3
-4
core/modules/node/lib/Drupal/node/Plugin/Block/SyndicateBlock.php
...ules/node/lib/Drupal/node/Plugin/Block/SyndicateBlock.php
+3
-4
core/modules/search/lib/Drupal/search/Plugin/Block/SearchBlock.php
...les/search/lib/Drupal/search/Plugin/Block/SearchBlock.php
+3
-4
core/modules/shortcut/lib/Drupal/shortcut/Plugin/Block/ShortcutsBlock.php
...rtcut/lib/Drupal/shortcut/Plugin/Block/ShortcutsBlock.php
+3
-4
core/modules/statistics/lib/Drupal/statistics/Plugin/Block/StatisticsPopularBlock.php
...Drupal/statistics/Plugin/Block/StatisticsPopularBlock.php
+3
-4
core/modules/system/lib/Drupal/system/Plugin/Block/SystemBreadcrumbBlock.php
.../lib/Drupal/system/Plugin/Block/SystemBreadcrumbBlock.php
+3
-4
core/modules/system/lib/Drupal/system/Plugin/Block/SystemHelpBlock.php
...system/lib/Drupal/system/Plugin/Block/SystemHelpBlock.php
+3
-4
core/modules/system/lib/Drupal/system/Plugin/Block/SystemMainBlock.php
...system/lib/Drupal/system/Plugin/Block/SystemMainBlock.php
+3
-4
core/modules/system/lib/Drupal/system/Plugin/Block/SystemMenuBlock.php
...system/lib/Drupal/system/Plugin/Block/SystemMenuBlock.php
+2
-3
core/modules/system/lib/Drupal/system/Plugin/Block/SystemPoweredByBlock.php
...m/lib/Drupal/system/Plugin/Block/SystemPoweredByBlock.php
+3
-4
core/modules/user/lib/Drupal/user/Plugin/Block/UserLoginBlock.php
...ules/user/lib/Drupal/user/Plugin/Block/UserLoginBlock.php
+3
-5
core/modules/user/lib/Drupal/user/Plugin/Block/UserNewBlock.php
...odules/user/lib/Drupal/user/Plugin/Block/UserNewBlock.php
+3
-4
core/modules/user/lib/Drupal/user/Plugin/Block/UserOnlineBlock.php
...les/user/lib/Drupal/user/Plugin/Block/UserOnlineBlock.php
+3
-4
core/modules/views/lib/Drupal/views/Plugin/Block/ViewsBlock.php
...odules/views/lib/Drupal/views/Plugin/Block/ViewsBlock.php
+2
-3
core/modules/views/lib/Drupal/views/Plugin/Block/ViewsExposedFilterBlock.php
...lib/Drupal/views/Plugin/Block/ViewsExposedFilterBlock.php
+2
-3
No files found.
core/modules/aggregator/lib/Drupal/aggregator/Plugin/Block/AggregatorCategoryBlock.php
View file @
0489b631
...
...
@@ -8,16 +8,15 @@
namespace
Drupal\aggregator\Plugin\Block
;
use
Drupal\block\BlockBase
;
use
Drupal\
Component\Annotation\Plugin
;
use
Drupal\
block\Annotation\Block
;
use
Drupal\Core\Annotation\Translation
;
/**
* Provides an 'Aggregator category' block for the latest items in a category.
*
* @
Plugin
(
* @
Block
(
* id = "aggregator_category_block",
* admin_label = @Translation("Aggregator category"),
* module = "aggregator",
* derivative = "Drupal\aggregator\Plugin\Derivative\AggregatorCategoryBlock"
* )
*/
...
...
core/modules/aggregator/lib/Drupal/aggregator/Plugin/Block/AggregatorFeedBlock.php
View file @
0489b631
...
...
@@ -8,16 +8,15 @@
namespace
Drupal\aggregator\Plugin\Block
;
use
Drupal\block\BlockBase
;
use
Drupal\
Component\Annotation\Plugin
;
use
Drupal\
block\Annotation\Block
;
use
Drupal\Core\Annotation\Translation
;
/**
* Provides an 'Aggregator feed' block with the latest items from the feed.
*
* @
Plugin
(
* @
Block
(
* id = "aggregator_feed_block",
* admin_label = @Translation("Aggregator feed"),
* module = "aggregator",
* derivative = "Drupal\aggregator\Plugin\Derivative\AggregatorFeedBlock"
* )
*/
...
...
core/modules/block/custom_block/lib/Drupal/custom_block/Plugin/Block/CustomBlockBlock.php
View file @
0489b631
...
...
@@ -8,7 +8,7 @@
namespace
Drupal\custom_block\Plugin\Block
;
use
Drupal\block\BlockBase
;
use
Drupal\
Component\Annotation\Plugin
;
use
Drupal\
block\Annotation\Block
;
use
Drupal\Core\Annotation\Translation
;
use
Drupal\Core\Plugin\ContainerFactoryPluginInterface
;
use
Drupal\Core\Extension\ModuleHandlerInterface
;
...
...
@@ -18,10 +18,9 @@
/**
* Defines a generic custom block type.
*
* @
Plugin
(
* @
Block
(
* id = "custom_block",
* admin_label = @Translation("Custom block"),
* module = "custom_block",
* derivative = "Drupal\custom_block\Plugin\Derivative\CustomBlock"
* )
*/
...
...
core/modules/block/lib/Drupal/block/Annotation/Block.php
0 → 100644
View file @
0489b631
<?php
/**
* @file
* Contains \Drupal\block\Annotation\Block.
*/
namespace
Drupal\block\Annotation
;
use
Drupal\Component\Annotation\Plugin
;
/**
* Defines a Block annotation object.
*
* @Annotation
*/
class
Block
extends
Plugin
{
/**
* The plugin ID.
*
* @var string
*/
public
$id
;
/**
* The administrative label of the block.
*
* @var \Drupal\Core\Annotation\Translation
*
* @ingroup plugin_translatable
*/
public
$admin_label
;
}
core/modules/block/lib/Drupal/block/Plugin/Type/BlockManager.php
View file @
0489b631
...
...
@@ -35,7 +35,8 @@ class BlockManager extends DefaultPluginManager {
* The module handler to invoke the alter hook with.
*/
public
function
__construct
(
\
Traversable
$namespaces
,
CacheBackendInterface
$cache_backend
,
LanguageManager
$language_manager
,
ModuleHandlerInterface
$module_handler
)
{
parent
::
__construct
(
'Plugin/Block'
,
$namespaces
);
$annotation_namespaces
=
array
(
'Drupal\block\Annotation'
=>
$namespaces
[
'Drupal\block'
]);
parent
::
__construct
(
'Plugin/Block'
,
$namespaces
,
$annotation_namespaces
,
'Drupal\block\Annotation\Block'
);
$this
->
alterInfo
(
$module_handler
,
'block'
);
$this
->
setCacheBackend
(
$cache_backend
,
$language_manager
,
'block_plugins'
);
}
...
...
@@ -48,6 +49,7 @@ public function processDefinition(&$definition, $plugin_id) {
// Ensure that every block has a category.
$definition
+=
array
(
'module'
=>
$definition
[
'provider'
],
'category'
=>
$definition
[
'provider'
],
);
}
...
...
core/modules/block/tests/modules/block_test/lib/Drupal/block_test/Plugin/Block/TestBlockInstantiation.php
View file @
0489b631
...
...
@@ -8,16 +8,15 @@
namespace
Drupal\block_test\Plugin\Block
;
use
Drupal\block\BlockBase
;
use
Drupal\
Component\Annotation\Plugin
;
use
Drupal\
block\Annotation\Block
;
use
Drupal\Core\Annotation\Translation
;
/**
* Provides a basic block for testing block instantiation and configuration.
*
* @
Plugin
(
* @
Block
(
* id = "test_block_instantiation",
* admin_label = @Translation("Display message"),
* module = "block_test"
* admin_label = @Translation("Display message")
* )
*/
class
TestBlockInstantiation
extends
BlockBase
{
...
...
core/modules/block/tests/modules/block_test/lib/Drupal/block_test/Plugin/Block/TestCacheBlock.php
View file @
0489b631
...
...
@@ -8,16 +8,15 @@
namespace
Drupal\block_test\Plugin\Block
;
use
Drupal\block\BlockBase
;
use
Drupal\
Component\Annotation\Plugin
;
use
Drupal\
block\Annotation\Block
;
use
Drupal\Core\Annotation\Translation
;
/**
* Provides a block to test caching.
*
* @
Plugin
(
* @
Block
(
* id = "test_cache",
* admin_label = @Translation("Test block caching"),
* module = "block_test"
* admin_label = @Translation("Test block caching")
* )
*/
class
TestCacheBlock
extends
BlockBase
{
...
...
core/modules/block/tests/modules/block_test/lib/Drupal/block_test/Plugin/Block/TestHtmlIdBlock.php
View file @
0489b631
...
...
@@ -7,17 +7,15 @@
namespace
Drupal\block_test\Plugin\Block
;
use
Drupal\block\BlockBase
;
use
Drupal\Component\Annotation\Plugin
;
use
Drupal\block\Annotation\Block
;
use
Drupal\Core\Annotation\Translation
;
/**
* Provides a block to test HTML IDs.
*
* @
Plugin
(
* @
Block
(
* id = "test_html_id",
* admin_label = @Translation("Test block html id"),
* module = "block_test"
* admin_label = @Translation("Test block html id")
* )
*/
class
TestHtmlIdBlock
extends
TestCacheBlock
{
...
...
core/modules/block/tests/modules/block_test/lib/Drupal/block_test/Plugin/Block/TestXSSTitleBlock.php
View file @
0489b631
...
...
@@ -7,15 +7,14 @@
namespace
Drupal\block_test\Plugin\Block
;
use
Drupal\
Component\Annotation\Plugin
;
use
Drupal\
block\Annotation\Block
;
/**
* Provides a block to test XSS in title.
*
* @
Plugin
(
* @
Block
(
* id = "test_xss_title",
* admin_label = "<script>alert('XSS subject');</script>",
* module = "block_test"
* admin_label = "<script>alert('XSS subject');</script>"
* )
*/
class
TestXSSTitleBlock
extends
TestCacheBlock
{
...
...
core/modules/book/lib/Drupal/book/Plugin/Block/BookNavigationBlock.php
View file @
0489b631
...
...
@@ -8,16 +8,15 @@
namespace
Drupal\book\Plugin\Block
;
use
Drupal\block\BlockBase
;
use
Drupal\
Component\Annotation\Plugin
;
use
Drupal\
block\Annotation\Block
;
use
Drupal\Core\Annotation\Translation
;
/**
* Provides a 'Book navigation' block.
*
* @
Plugin
(
* @
Block
(
* id = "book_navigation",
* admin_label = @Translation("Book navigation"),
* module = "book"
* admin_label = @Translation("Book navigation")
* )
*/
class
BookNavigationBlock
extends
BlockBase
{
...
...
core/modules/comment/lib/Drupal/comment/Plugin/Block/RecentCommentsBlock.php
View file @
0489b631
...
...
@@ -8,16 +8,15 @@
namespace
Drupal\comment\Plugin\Block
;
use
Drupal\block\BlockBase
;
use
Drupal\
Component\Annotation\Plugin
;
use
Drupal\
block\Annotation\Block
;
use
Drupal\Core\Annotation\Translation
;
/**
* Provides a 'Recent comments' block.
*
* @
Plugin
(
* @
Block
(
* id = "recent_comments",
* admin_label = @Translation("Recent comments"),
* module = "comment"
* admin_label = @Translation("Recent comments")
* )
*/
class
RecentCommentsBlock
extends
BlockBase
{
...
...
core/modules/forum/lib/Drupal/forum/Plugin/Block/ActiveTopicsBlock.php
View file @
0489b631
...
...
@@ -7,16 +7,15 @@
namespace
Drupal\forum\Plugin\Block
;
use
Drupal\
Component\Annotation\Plugin
;
use
Drupal\
block\Annotation\Block
;
use
Drupal\Core\Annotation\Translation
;
/**
* Provides an 'Active forum topics' block.
*
* @
Plugin
(
* @
Block
(
* id = "forum_active_block",
* admin_label = @Translation("Active forum topics"),
* module = "forum"
* admin_label = @Translation("Active forum topics")
* )
*/
class
ActiveTopicsBlock
extends
ForumBlockBase
{
...
...
core/modules/forum/lib/Drupal/forum/Plugin/Block/NewTopicsBlock.php
View file @
0489b631
...
...
@@ -7,16 +7,15 @@
namespace
Drupal\forum\Plugin\Block
;
use
Drupal\
Component\Annotation\Plugin
;
use
Drupal\
block\Annotation\Block
;
use
Drupal\Core\Annotation\Translation
;
/**
* Provides a 'New forum topics' block.
*
* @
Plugin
(
* @
Block
(
* id = "forum_new_block",
* admin_label = @Translation("New forum topics"),
* module = "forum"
* admin_label = @Translation("New forum topics")
* )
*/
class
NewTopicsBlock
extends
ForumBlockBase
{
...
...
core/modules/language/lib/Drupal/language/Plugin/Block/LanguageBlock.php
View file @
0489b631
...
...
@@ -8,16 +8,15 @@
namespace
Drupal\language\Plugin\Block
;
use
Drupal\block\BlockBase
;
use
Drupal\
Component\Annotation\Plugin
;
use
Drupal\
block\Annotation\Block
;
use
Drupal\Core\Annotation\Translation
;
/**
* Provides a 'Language switcher' block.
*
* @
Plugin
(
* @
Block
(
* id = "language_block",
* admin_label = @Translation("Language switcher"),
* module = "language",
* derivative = "Drupal\language\Plugin\Derivative\LanguageBlock"
* )
*/
...
...
core/modules/menu/lib/Drupal/menu/Plugin/Block/MenuBlock.php
View file @
0489b631
...
...
@@ -8,16 +8,15 @@
namespace
Drupal\menu\Plugin\Block
;
use
Drupal\system\Plugin\Block\SystemMenuBlock
;
use
Drupal\
Component\Annotation\Plugin
;
use
Drupal\
block\Annotation\Block
;
use
Drupal\Core\Annotation\Translation
;
/**
* Provides a generic Menu block.
*
* @
Plugin
(
* @
Block
(
* id = "menu_menu_block",
* admin_label = @Translation("Menu"),
* module = "menu",
* derivative = "Drupal\menu\Plugin\Derivative\MenuBlock"
* )
*/
...
...
core/modules/node/lib/Drupal/node/Plugin/Block/RecentContentBlock.php
View file @
0489b631
...
...
@@ -8,16 +8,15 @@
namespace
Drupal\node\Plugin\Block
;
use
Drupal\block\BlockBase
;
use
Drupal\
Component\Annotation\Plugin
;
use
Drupal\
block\Annotation\Block
;
use
Drupal\Core\Annotation\Translation
;
/**
* Provides a 'Recent content' block.
*
* @
Plugin
(
* @
Block
(
* id = "node_recent_block",
* admin_label = @Translation("Recent content"),
* module = "node"
* admin_label = @Translation("Recent content")
* )
*/
class
RecentContentBlock
extends
BlockBase
{
...
...
core/modules/node/lib/Drupal/node/Plugin/Block/SyndicateBlock.php
View file @
0489b631
...
...
@@ -8,16 +8,15 @@
namespace
Drupal\node\Plugin\Block
;
use
Drupal\block\BlockBase
;
use
Drupal\
Component\Annotation\Plugin
;
use
Drupal\
block\Annotation\Block
;
use
Drupal\Core\Annotation\Translation
;
/**
* Provides a 'Syndicate' block that links to the site's RSS feed.
*
* @
Plugin
(
* @
Block
(
* id = "node_syndicate_block",
* admin_label = @Translation("Syndicate"),
* module = "node"
* admin_label = @Translation("Syndicate")
* )
*/
class
SyndicateBlock
extends
BlockBase
{
...
...
core/modules/search/lib/Drupal/search/Plugin/Block/SearchBlock.php
View file @
0489b631
...
...
@@ -8,7 +8,7 @@
namespace
Drupal\search\Plugin\Block
;
use
Drupal\block\BlockBase
;
use
Drupal\
Component\Annotation\Plugin
;
use
Drupal\
block\Annotation\Block
;
use
Drupal\Core\Annotation\Translation
;
use
Drupal\Core\Plugin\ContainerFactoryPluginInterface
;
use
Drupal\search\Form\SearchBlockForm
;
...
...
@@ -18,10 +18,9 @@
/**
* Provides a 'Search form' block.
*
* @
Plugin
(
* @
Block
(
* id = "search_form_block",
* admin_label = @Translation("Search form"),
* module = "search"
* admin_label = @Translation("Search form")
* )
*/
class
SearchBlock
extends
BlockBase
implements
ContainerFactoryPluginInterface
{
...
...
core/modules/shortcut/lib/Drupal/shortcut/Plugin/Block/ShortcutsBlock.php
View file @
0489b631
...
...
@@ -8,16 +8,15 @@
namespace
Drupal\shortcut\Plugin\Block
;
use
Drupal\block\BlockBase
;
use
Drupal\
Component\Annotation\Plugin
;
use
Drupal\
block\Annotation\Block
;
use
Drupal\Core\Annotation\Translation
;
/**
* Provides a 'Shortcut' block.
*
* @
Plugin
(
* @
Block
(
* id = "shortcuts",
* admin_label = @Translation("Shortcuts"),
* module = "shortcut"
* admin_label = @Translation("Shortcuts")
* )
*/
class
ShortcutsBlock
extends
BlockBase
{
...
...
core/modules/statistics/lib/Drupal/statistics/Plugin/Block/StatisticsPopularBlock.php
View file @
0489b631
...
...
@@ -8,16 +8,15 @@
namespace
Drupal\statistics\Plugin\Block
;
use
Drupal\block\BlockBase
;
use
Drupal\
Component\Annotation\Plugin
;
use
Drupal\
block\Annotation\Block
;
use
Drupal\Core\Annotation\Translation
;
/**
* Provides a 'Popular content' block.
*
* @
Plugin
(
* @
Block
(
* id = "statistics_popular_block",
* admin_label = @Translation("Popular content"),
* module = "statistics"
* admin_label = @Translation("Popular content")
* )
*/
class
StatisticsPopularBlock
extends
BlockBase
{
...
...
core/modules/system/lib/Drupal/system/Plugin/Block/SystemBreadcrumbBlock.php
View file @
0489b631
...
...
@@ -8,16 +8,15 @@
namespace
Drupal\system\Plugin\Block
;
use
Drupal\block\BlockBase
;
use
Drupal\
Component\Annotation\Plugin
;
use
Drupal\
block\Annotation\Block
;
use
Drupal\Core\Annotation\Translation
;
/**
* Provides a block to display the breadcrumbs.
*
* @
Plugin
(
* @
Block
(
* id = "system_breadcrumb_block",
* admin_label = @Translation("Breadcrumbs"),
* module = "system"
* admin_label = @Translation("Breadcrumbs")
* )
*/
class
SystemBreadcrumbBlock
extends
BlockBase
{
...
...
core/modules/system/lib/Drupal/system/Plugin/Block/SystemHelpBlock.php
View file @
0489b631
...
...
@@ -8,16 +8,15 @@
namespace
Drupal\system\Plugin\Block
;
use
Drupal\block\BlockBase
;
use
Drupal\
Component\Annotation\Plugin
;
use
Drupal\
block\Annotation\Block
;
use
Drupal\Core\Annotation\Translation
;
/**
* Provides a 'System Help' block.
*
* @
Plugin
(
* @
Block
(
* id = "system_help_block",
* admin_label = @Translation("System Help"),
* module = "system"
* admin_label = @Translation("System Help")
* )
*/
class
SystemHelpBlock
extends
BlockBase
{
...
...
core/modules/system/lib/Drupal/system/Plugin/Block/SystemMainBlock.php
View file @
0489b631
...
...
@@ -8,16 +8,15 @@
namespace
Drupal\system\Plugin\Block
;
use
Drupal\block\BlockBase
;
use
Drupal\
Component\Annotation\Plugin
;
use
Drupal\
block\Annotation\Block
;
use
Drupal\Core\Annotation\Translation
;
/**
* Provides a 'Main page content' block.
*
* @
Plugin
(
* @
Block
(
* id = "system_main_block",
* admin_label = @Translation("Main page content"),
* module = "system"
* admin_label = @Translation("Main page content")
* )
*/
class
SystemMainBlock
extends
BlockBase
{
...
...
core/modules/system/lib/Drupal/system/Plugin/Block/SystemMenuBlock.php
View file @
0489b631
...
...
@@ -8,16 +8,15 @@
namespace
Drupal\system\Plugin\Block
;
use
Drupal\block\BlockBase
;
use
Drupal\
Component\Annotation\Plugin
;
use
Drupal\
block\Annotation\Block
;
use
Drupal\Core\Annotation\Translation
;
/**
* Provides a 'System Menu' block.
*
* @
Plugin
(
* @
Block
(
* id = "system_menu_block",
* admin_label = @Translation("System Menu"),
* module = "system",
* category = "menu",
* derivative = "Drupal\system\Plugin\Derivative\SystemMenuBlock"
* )
...
...
core/modules/system/lib/Drupal/system/Plugin/Block/SystemPoweredByBlock.php
View file @
0489b631
...
...
@@ -8,16 +8,15 @@
namespace
Drupal\system\Plugin\Block
;
use
Drupal\block\BlockBase
;
use
Drupal\
Component\Annotation\Plugin
;
use
Drupal\
block\Annotation\Block
;
use
Drupal\Core\Annotation\Translation
;
/**
* Provides a 'Powered by Drupal' block.
*
* @
Plugin
(
* @
Block
(
* id = "system_powered_by_block",
* admin_label = @Translation("Powered by Drupal"),
* module = "system"
* admin_label = @Translation("Powered by Drupal")
* )
*/
class
SystemPoweredByBlock
extends
BlockBase
{
...
...
core/modules/user/lib/Drupal/user/Plugin/Block/UserLoginBlock.php
View file @
0489b631
...
...
@@ -8,21 +8,19 @@
namespace
Drupal\user\Plugin\Block
;
use
Drupal\block\BlockBase
;
use
Drupal\
Component\Annotation\Plugin
;
use
Drupal\
block\Annotation\Block
;
use
Drupal\Core\Annotation\Translation
;
use
Drupal\Core\Plugin\ContainerFactoryPluginInterface
;
use
Drupal\user\Form\UserLoginForm
;
use
Symfony\Component\DependencyInjection\ContainerAwareInterface
;
use
Symfony\Component\DependencyInjection\ContainerInterface
;
use
Symfony\Component\HttpFoundation\Request
;
/**
* Provides a 'User login' block.
*
* @
Plugin
(
* @
Block
(
* id = "user_login_block",
* admin_label = @Translation("User login"),
* module = "user"
* admin_label = @Translation("User login")
* )
*/
class
UserLoginBlock
extends
BlockBase
implements
ContainerFactoryPluginInterface
{
...
...
core/modules/user/lib/Drupal/user/Plugin/Block/UserNewBlock.php
View file @
0489b631
...
...
@@ -8,16 +8,15 @@
namespace
Drupal\user\Plugin\Block
;
use
Drupal\block\BlockBase
;
use
Drupal\
Component\Annotation\Plugin
;
use
Drupal\
block\Annotation\Block
;
use
Drupal\Core\Annotation\Translation
;
/**
* Provides a "Who's new" block.
*
* @
Plugin
(
* @
Block
(
* id = "user_new_block",
* admin_label = @Translation("Who's new"),
* module = "user"
* admin_label = @Translation("Who's new")
* )
*/
class
UserNewBlock
extends
BlockBase
{
...
...
core/modules/user/lib/Drupal/user/Plugin/Block/UserOnlineBlock.php
View file @
0489b631
...
...
@@ -8,7 +8,7 @@
namespace
Drupal\user\Plugin\Block
;
use
Drupal\block\BlockBase
;
use
Drupal\
Component\Annotation\Plugin
;
use
Drupal\
block\Annotation\Block
;
use
Drupal\Core\Annotation\Translation
;
/**
...
...
@@ -17,10 +17,9 @@
* @todo Move this block to the Statistics module and remove its dependency on
* {users}.access.
*
* @
Plugin
(
* @
Block
(
* id = "user_online_block",
* admin_label = @Translation("Who's online"),
* module = "user"
* admin_label = @Translation("Who's online")