toOptionArray() as $item) { $array[$item['value']] = $item['label']; } return $array; } /** * @return array */ public function toOptionArray() { return [ [ 'value' => static::TOP, 'label' => __('Top'), ], [ 'value' => static::BOTTOM, 'label' => __('Bottom'), ], [ 'value' => static::CENTER, 'label' => __('Center'), ], ]; } }