/** * Return the delete product type button * * @param array $row * @param string $href * @param string $label * @param string $title * @param string $icon * @param string $attributes * * @return string */ public function deleteProductType($row, $href, $label, $title, $icon, $attributes) { if (Product::countBy('type', $row['id']) > 0) { return \Image::getHtml(preg_replace('/\\.gif$/i', '_.gif', $icon)) . ' '; } /** @type \BackendUser $objUser */ $objUser = \BackendUser::getInstance(); return $objUser->isAdmin || $objUser->hasAccess('delete', 'iso_product_typep') ? '<a href="' . $this->addToUrl($href . '&id=' . $row['id']) . '" title="' . specialchars($title) . '"' . $attributes . '>' . \Image::getHtml($icon, $label) . '</a> ' : \Image::getHtml(preg_replace('/\\.gif$/i', '_.gif', $icon)) . ' '; }