public function EntityFlagType::defaultConfiguration in Flag 8.4
Gets default configuration for this plugin.
Return value
array An associative array with the default configuration.
Overrides FlagTypeBase::defaultConfiguration
1 call to EntityFlagType::defaultConfiguration()
- UserFlagType::defaultConfiguration in src/
Plugin/ Flag/ UserFlagType.php - Gets default configuration for this plugin.
1 method overrides EntityFlagType::defaultConfiguration()
- UserFlagType::defaultConfiguration in src/
Plugin/ Flag/ UserFlagType.php - Gets default configuration for this plugin.
File
- src/
Plugin/ Flag/ EntityFlagType.php, line 73
Class
- EntityFlagType
- Provides a flag type for all entity types.
Namespace
Drupal\flag\Plugin\FlagCode
public function defaultConfiguration() {
$options = parent::defaultConfiguration();
$options += [
// Output the flag in the entity links.
// This is empty for now and will get overridden for different
// entities.
// @see hook_entity_view().
'show_in_links' => [],
// Output the flag as individual fields.
'show_as_field' => TRUE,
// Add a checkbox for the flag in the entity form.
// @see hook_field_attach_form().
'show_on_form' => FALSE,
'show_contextual_link' => FALSE,
// Additional permissions to expose.
'extra_permissions' => [],
];
return $options;
}