| Current Path : /home/rtorresani/www/vendor/magento/module-payment/Model/Config/Source/ |
| Current File : //home/rtorresani/www/vendor/magento/module-payment/Model/Config/Source/Cctype.php |
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\Payment\Model\Config\Source;
class Cctype implements \Magento\Framework\Option\ArrayInterface
{
/**
* Payment config model
*
* @var \Magento\Payment\Model\Config
*/
protected $_paymentConfig;
/**
* Construct
*
* @param \Magento\Payment\Model\Config $paymentConfig
*/
public function __construct(\Magento\Payment\Model\Config $paymentConfig)
{
$this->_paymentConfig = $paymentConfig;
}
/**
* {@inheritdoc}
*/
public function toOptionArray()
{
$options = [];
foreach ($this->_paymentConfig->getCcTypes() as $code => $name) {
$options[] = ['value' => $code, 'label' => $name];
}
return $options;
}
}