Example #1
0
 protected function getListFields()
 {
     return array_merge($this->getIdCheckboxProp(), ['productID' => ['title' => 'Id', 'column_classes' => 'dt-id-column', 'data_type' => 'integer'], 'name' => ['max_length' => 64, 'type' => 'link', 'title' => 'Название'], 'category.name' => ['title' => 'Категория', 'type' => 'link', 'template' => '/admin/category/%category.categoryID%', 'width' => 150], 'Price' => ['title' => 'Цена (руб.)', 'value_prefix' => '', 'data_type' => 'integer'], 'status' => ['title' => 'Статус', 'value_converter' => function ($value) {
         return Product::getFormattedProductStatus($value);
     }, 'no_escape' => true], 'picture' => ['type' => 'image', 'dir_path' => '/products_pictures/', 'max_width' => 40, 'max_height' => 30, 'is_link' => true, 'column_classes' => 'dt-picture-column', 'title' => 'Картинка', 'thumbnail' => 'tiny'], 'enabled' => ['type' => 'boolean', 'column_classes' => 'dt-flag-column', 'title' => '+']], $this->getEditLinkProp(), $this->getDeleteLinkProp());
 }