setColumns([
'cover_photo' => [
'value' => function (EntryInterface $entry) {
return "
";
},
],
'name' => [
'sort_column' => 'slug',
'wrapper' => '
#{value.id}{value.name}
{value.finish_at}
{value.category}',
'value' => [
'id' => 'entry.id',
'finish_at' => 'entry.finish_at',
'name' => function (EntryInterface $entry) {
if ($entry->getTitle()) {
$value = " {entry.name} ";
} else {
$value = "" . trans("visiosoft.module.advs::view.unfinished") . "";
}
return $value;
},
'category' => function (EntryInterface $entry, CategoryModel $categoryModel) {
$category = $categoryModel->getCat($entry->cat1);
if (!is_null($category))
return $category->name;
}
],
],
'price' => [
'wrapper' => '{{currency_format("{entry.price}","{entry.currency}")}}',
'class' => 'advs-price',
],
'country' => [
'class' => 'advs-country',
],
'created_by' => [
'value' => 'entry.created_by.name',
],
]);
}
}