You are here

public function Nif::getDefaultProperties in Field NIF 8

Get default properties.

Return value

array An associative array containing default element properties.

Overrides WebformElementBase::getDefaultProperties

File

src/Plugin/WebformElement/Nif.php, line 24

Class

Nif
Provides a 'field_nif' element.

Namespace

Drupal\field_nif\Plugin\WebformElement

Code

public function getDefaultProperties() {
  $properties = [
    // Title.
    'title' => '',
    'default_value' => '',
    // Supported types.
    'supported_types' => [
      'nif',
      'nie',
      'cif',
    ],
    // Form display.
    'title_display' => '',
    'description_display' => '',
    'field_prefix' => '',
    'field_suffix' => '',
    'disabled' => FALSE,
    // Form validation.
    'required' => FALSE,
    'required_error' => '',
    'unique' => FALSE,
    'unique_error' => '',
    // Attributes.
    'wrapper_attributes' => [],
    'attributes' => [],
    // Conditional logic.
    'states' => [],
    // Element access.
    'access_create_roles' => [
      'anonymous',
      'authenticated',
    ],
    'access_create_users' => [],
    'access_update_roles' => [
      'anonymous',
      'authenticated',
    ],
    'access_update_users' => [],
    'access_view_roles' => [
      'anonymous',
      'authenticated',
    ],
    'access_view_users' => [],
  ];
  return $properties;
}