Update to Drupal 8.0.0-rc3. For more information, see https://www.drupal.org/node/2608078
This commit is contained in:
parent
6419a031d7
commit
4afb23bbd3
762 changed files with 20080 additions and 6368 deletions
|
@ -16,7 +16,7 @@ use Drupal\Core\Block\BlockBase;
|
|||
* id = "test_context_aware",
|
||||
* admin_label = @Translation("Test context-aware block"),
|
||||
* context = {
|
||||
* "user" = @ContextDefinition("entity:user")
|
||||
* "user" = @ContextDefinition("entity:user", required = FALSE)
|
||||
* }
|
||||
* )
|
||||
*/
|
||||
|
@ -31,7 +31,7 @@ class TestContextAwareBlock extends BlockBase {
|
|||
return array(
|
||||
'#prefix' => '<div id="' . $this->getPluginId() . '--username">',
|
||||
'#suffix' => '</div>',
|
||||
'#markup' => $user->getUsername(),
|
||||
'#markup' => $user ? $user->getUsername() : 'No context mapping selected.' ,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\block_test\Plugin\Block\TestContextAwareBlock.
|
||||
* Contains \Drupal\block_test\Plugin\Block\TestContextAwareUnsatisfiedBlock.
|
||||
*/
|
||||
|
||||
namespace Drupal\block_test\Plugin\Block;
|
||||
|
|
Reference in a new issue