class UserLogin in Business Rules 8
Same name and namespace in other branches
- 2.x src/Plugin/BusinessRulesReactsOn/UserLogin.php \Drupal\business_rules\Plugin\BusinessRulesReactsOn\UserLogin
Class UserLogin.
@package Drupal\business_rules\Plugin\BusinessRulesReactsOn
Plugin annotation
@BusinessRulesReactsOn(
id = "user_login",
label = @Translation("User has logged in"),
description = @Translation("Reacts after the user has logged in."),
group = @Translation("User"),
eventName = "business_rules.user_login",
hasTargetEntity = TRUE,
hasTargetBundle = TRUE,
priority = 1000,
)
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface
- class \Drupal\business_rules\Plugin\BusinessRulesReactsOnPlugin implements BusinessRulesReactsOnInterface
- class \Drupal\business_rules\Plugin\BusinessRulesReactsOn\UserLogin
- class \Drupal\business_rules\Plugin\BusinessRulesReactsOnPlugin implements BusinessRulesReactsOnInterface
Expanded class hierarchy of UserLogin
File
- src/
Plugin/ BusinessRulesReactsOn/ UserLogin.php, line 24
Namespace
Drupal\business_rules\Plugin\BusinessRulesReactsOnView source
class UserLogin extends BusinessRulesReactsOnPlugin {
/**
* {@inheritdoc}
*/
public function processForm(array &$form, FormStateInterface $form_state) {
parent::processForm($form, $form_state);
$form['entity']['context']['target_entity_type']['#required'] = FALSE;
$form['entity']['context']['target_entity_type']['#value'] = 'user';
$form['entity']['context']['target_entity_type']['#disabled'] = TRUE;
$form['entity']['context']['target_entity_type']['#options'] = [
'user' => $form['entity']['context']['target_entity_type']['#options']['user'],
];
$form['entity']['context']['target_bundle']['#options'] = [
'user' => t('User'),
];
$form['entity']['context']['target_bundle']['#required'] = FALSE;
$form['entity']['context']['target_bundle']['#value'] = 'user';
$form['entity']['context']['target_bundle']['#disabled'] = TRUE;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
BusinessRulesReactsOnPlugin:: |
protected | property | The business rules processor. | |
BusinessRulesReactsOnPlugin:: |
protected | property | The business rules util. | |
BusinessRulesReactsOnPlugin:: |
public | function |
Constructs a \Drupal\Component\Plugin\PluginBase object. Overrides PluginBase:: |
|
PluginBase:: |
protected | property | Configuration information passed into the plugin. | 1 |
PluginBase:: |
protected | property | The plugin implementation definition. | 1 |
PluginBase:: |
protected | property | The plugin_id. | |
PluginBase:: |
constant | A string which is used to separate base plugin IDs from the derivative ID. | ||
PluginBase:: |
public | function |
Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the definition of the plugin implementation. Overrides PluginInspectionInterface:: |
3 |
PluginBase:: |
public | function |
Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface:: |
|
PluginBase:: |
public | function | Determines if the plugin is configurable. | |
UserLogin:: |
public | function |
Process the BusinessRule form for reactsOn plugins. Overrides BusinessRulesReactsOnPlugin:: |