Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AbstractCardRenderer.php
Go to the documentation of this file.
1 <?php
7 
10 
17 {
21  private $iconsProvider;
22 
30  public function __construct(
31  Template\Context $context,
32  CcConfigProvider $iconsProvider,
33  array $data = []
34  ) {
35  parent::__construct($context, $data);
36  $this->iconsProvider = $iconsProvider;
37  }
38 
44  protected function getIconForType($type)
45  {
46  if (isset($this->iconsProvider->getIcons()[$type])) {
47  return $this->iconsProvider->getIcons()[$type];
48  }
49 
50  return [
51  'url' => '',
52  'width' => 0,
53  'height' => 0
54  ];
55  }
56 }
$type
Definition: item.phtml:13
__construct(Template\Context $context, CcConfigProvider $iconsProvider, array $data=[])