/** * Return option array * * @return array */ public function toOptionArray() { $result = array(); foreach ($this->paymentHelper->getPaymentMethods() as $code => $data) { if ($this->specification->isSatisfiedBy($code)) { $result[$code] = isset($data['title']) ? $data['title'] : $this->paymentHelper->getMethodInstance($code)->getTitle(); } } return $result; }