options) { $this->options = [ [ 'value' => self::PENDING, 'label' => __('Pending') ], [ 'value' => self::VIEWED, 'label' => __('Viewed') ], [ 'value' => self::ANSWERED, 'label' => __('Answered') ] ]; } return $this->options; } public function getOptionByValue($value) { $options = $this->toOptionArray(); foreach ($options as $option) { if ($option['value'] == $value) { return $option['label']; } } return ''; } }