Code Duplication    Length = 7-7 lines in 3 locations

src/Export/Export.php 1 location

@@ 91-97 (lines=7) @@
88
			'href'  => $this->link
89
		]);
90
91
		if ($this->icon) {
92
			$a->add(Html::el('span')->class(DataGrid::$icon_prefix.$this->icon));
93
94
			if (strlen($this->text)) {
95
				$a->add(' ');
96
			}
97
		}
98
99
		$a->add($this->text);
100

src/Column/ItemDetail.php 1 location

@@ 88-94 (lines=7) @@
85
			->data('toggle-detail', $row->getId())
86
			->data('toggle-detail-grid', $this->grid->getName());
87
88
		if ($this->icon) {
89
			$a->add(Html::el('span')->class(DataGrid::$icon_prefix.$this->icon));
90
			
91
			if (strlen($this->text)) {
92
				$a->add(' ');
93
			}
94
		}
95
96
		$a->add($this->text);
97

src/Column/Action.php 1 location

@@ 111-117 (lines=7) @@
108
		$a = Html::el('a')
109
			->href($parent->link($this->href, $this->getItemParams($row)));
110
111
		if ($this->icon) {
112
			$a->add(Html::el('span')->class(DataGrid::$icon_prefix.$this->icon));
113
114
			if (strlen($this->name)) {
115
				$a->add(' ');
116
			}
117
		}
118
119
		if ($this->data_attributes) {
120
			foreach ($this->data_attributes as $key => $value) {