addColumn('no', 'no'); $this->addColumn('file', 'title', ['title' => 'Name', 'orderBy' => 'title', 'params' => ['file' => 'file']]); $this->addColumn('vendors', 'vendor', [ 'title' => 'Vendor', 'defaultText' => 'All vendors', 'initCallback' => [$this, 'initVendorBlacklistColumn'], ]); $this->addColumn('date', 'added', ['title' => 'Upload date', 'orderBy' => 'added']); $this->addColumn('text', 'category', ['orderBy' => 'category']); $this->addColumn('options', 'options'); $this->addColumn('options', 'options', [ 'actions' => [ 'edit' => [], 'delete' => [], ], 'initCallback' => function (array $options) { if (in_array( $options['row']['recordType'], [AbstractObj::RECORD_TYPE_TAXATION_INVOICE, AbstractObj::RECORD_TYPE_LICENSE, AbstractObj::RECORD_TYPE_PREMIUM] )) { unset($options['column']['actions']['edit']); unset($options['column']['actions']['delete']); } }, ]); return $this; } }