Back to PhocacartRenderAdmincolumns class

Method categories

public
categories
(mixed $item, mixed &$options)

Method categories - Source code

public function categories($item, &$options)
{
    $o = array();
    $id = $item['id'];
    if (isset($item['value'][$id])) {
        foreach ($item['value'][$id] as $k => $v) {
            if ($item['caneditcategory'] && isset($item['linkeditcategory']) && $item['linkeditcategory'] != '') {
                $linkCat = Route::_($item['linkeditcategory'] . '&id=' . (int) $v['id']);
                $o[] = '<a href="' . Route::_($linkCat) . '">' . PhocacartText::filterValue($v['title'], 'text') . '</a>';
            } else {
                $o[] = PhocacartText::filterValue($v['title'], 'text');
            }
        }
    }
    return $this->r->td(implode("\n", $o), 'small');
}