You are here

protected function SimpleMathField::getFieldType in Views Simple Math Field 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/views/field/SimpleMathField.php \Drupal\views_simple_math_field\Plugin\views\field\SimpleMathField::getFieldType()

Determine the field type we are dealing with.

Parameters

$field:

Return value

string

1 call to SimpleMathField::getFieldType()
SimpleMathField::getFieldValue in src/Plugin/views/field/SimpleMathField.php
Get the value of a simple math field.

File

src/Plugin/views/field/SimpleMathField.php, line 172
Defines Drupal\views_simple_math_field\Plugin\views\field\SimpleMathField.

Class

SimpleMathField
Field handler to complete mathematical operation.

Namespace

Drupal\views_simple_math_field\Plugin\views\field

Code

protected function getFieldType($field) {
  $field_handler = $this->displayHandler
    ->getHandler('field', $field)->options;
  if (!empty($field_handler['type'])) {
    $field_type = $field_handler['type'];
  }
  else {
    $field_type = 'undefined';
  }
  return $field_type;
}