Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal-3443205
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
drupal-3443205
Commits
0baa9b26
Commit
0baa9b26
authored
10 years ago
by
Alex Pott
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#2415515
by eojthebrave: Add @Event documentation to all BlockEvents
parent
b7057716
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
core/modules/block/src/Event/BlockEvents.php
+24
-0
24 additions, 0 deletions
core/modules/block/src/Event/BlockEvents.php
with
24 additions
and
0 deletions
core/modules/block/src/Event/BlockEvents.php
+
24
−
0
View file @
0baa9b26
...
...
@@ -15,16 +15,40 @@ final class BlockEvents {
/**
* Name of the event when gathering condition context for a block plugin.
*
* This event allows you to provide additional context that can be used by
* a condition plugin in order to determine the visibility of a block. The
* event listener method receives a \Drupal\block\Event\BlockContextEvent
* instance. Generally any new context is paired with a new condition plugin
* that interprets the provided context and allows the block system to
* determine whether or not the block should be displayed.
*
* @Event
*
* @see \Drupal\Core\Block\BlockBase::getConditionContexts()
* @see \Drupal\block\Event\BlockContextEvent
* @see \Drupal\block\EventSubscriber\NodeRouteContext::onBlockActiveContext()
* @see \Drupal\Core\Condition\ConditionInterface
*/
const
ACTIVE_CONTEXT
=
'block.active_context'
;
/**
* Name of the event when gathering contexts for plugin configuration.
*
* This event allows you to provide information about your context to the
* administration UI without having to provide a value for the context. For
* example, during configuration there is no specific node to pass as context.
* However, we still need to inform the system that a context named 'node' is
* available and provide a definition so that blocks can be configured to use
* it.
*
* The event listener method receives a \Drupal\block\Event\BlockContextEvent
* instance.
*
* @Event
*
* @see \Drupal\block\BlockForm::form()
* @see \Drupal\block\Event\BlockContextEvent
* @see \Drupal\block\EventSubscriber\NodeRouteContext::onBlockAdministrativeContext()
*/
const
ADMINISTRATIVE_CONTEXT
=
'block.administrative_context'
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment