toArray(); foreach ( $array as $key => $value ) { $optionArray[] = [ 'value' => $key, 'label' => $value ]; } return $optionArray; } public function toArray() { return [ '' => __( 'Athlete Default (Slide from Left)' ), 'simple' => __( 'Simple (Fade)' ), ]; } }