toOptionArray() as $item) { $array[$item['value']] = $item['label']; } return $array; } /** * @return array */ public function toOptionArray() { return [ [ 'value' => static::NORMAL, 'label' => __('Normal, with bg'), ], [ 'value' => static::UNDERLINED, 'label' => __('Underlined'), ], ]; } }