toOptionArray() as $item) { $array[$item['value']] = $item['label']; } return $array; } /** * @return array */ public function toOptionArray() { return [ [ 'value' => static::LEFT, 'label' => __('Left'), ], [ 'value' => static::RIGHT, 'label' => __('Right'), ], [ 'value' => static::CENTER, 'label' => __('Center'), ], ]; } }