You are here

protected function State::getFieldName in State Machine 8

Gets the name of the entity field on which this filter operates.

Return value

string The field name.

1 call to State::getFieldName()
State::getValueOptions in src/Plugin/views/filter/State.php
Child classes should be used to override this function and set the 'value options', unless 'options callback' is defined as a valid function or static public method to generate these values.

File

src/Plugin/views/filter/State.php, line 107

Class

State
Filter by workflow state.

Namespace

Drupal\state_machine\Plugin\views\filter

Code

protected function getFieldName() {
  if (isset($this->configuration['field_name'])) {

    // Configurable field.
    $field_name = $this->configuration['field_name'];
  }
  else {

    // Base field.
    $field_name = $this->configuration['entity field'];
  }
  return $field_name;
}