public function getFieldInfo($field_name)
    {
        $field_name = $this->getFieldNameByLocator($field_name);

        return empty($field_name) ? [] : field_info_field($field_name);
    }
public function getFieldInfo($field_name)
    {
        $field_name = $this->getFieldNameByLocator($field_name);

        return empty($field_name) ? [] : field_info_field($field_name);
    }
@param string $field_name
Machine name or label of a field.

@return array[]
Drupal field definition.