You are here

public static function Link::defaultContextSettings in Field Group Link 8

Same name and namespace in other branches
  1. 8.3 src/Plugin/field_group/FieldGroupFormatter/Link.php \Drupal\field_group_link\Plugin\field_group\FieldGroupFormatter\Link::defaultContextSettings()

File

src/Plugin/field_group/FieldGroupFormatter/Link.php, line 34

Class

Link
Plugin implementation of the 'link' formatter.

Namespace

Drupal\field_group_link\Plugin\field_group\FieldGroupFormatter

Code

public static function defaultContextSettings($context) {
  $defaults = array(
    'target' => '_none',
    'classes' => '',
    'custom_uri' => '',
    'target_attribute' => 'default',
  ) + parent::defaultSettings($context);
  if ($context == 'form') {
    $defaults['required_fields'] = 1;
  }
  return $defaults;
}