toArray() as $value => $label) { $options[] = [ 'value' => $value, 'label' => $label ]; } return $options; } /** * Get options in "key-value" format * * @return array */ public function toArray() { return [ self::LEFT => __('Left'), self::RIGHT => __('Right') ]; } }