Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Concat.php
Go to the documentation of this file.
1 <?php
7 
15 class Concat extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer
16 {
23  public function render(\Magento\Framework\DataObject $row)
24  {
25  $dataArr = [];
26  $column = $this->getColumn();
27  $methods = $column->getGetter() ?: $column->getIndex();
28  foreach ($methods as $method) {
29  if ($column->getGetter()
30  && is_callable([$row, $method])
31  && substr_compare('get', $method, 1, 3) !== 0
32  ) {
34  } else {
35  $data = $row->getData($method);
36  }
37  if (strlen($data) > 0) {
38  $dataArr[] = $data;
39  }
40  }
41  $data = implode($column->getSeparator(), $dataArr);
42 
43  return $data;
44  }
45 }
render(\Magento\Framework\DataObject $row)
Definition: Concat.php:23
$methods
Definition: billing.phtml:71
$method
Definition: info.phtml:13