• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

Store / Website Column in Magento 2 Admin Grid - Custom Module

phpmysqlmagento2


PHP Snippet 1:

 /**
 * Check is single store mode
 */
 if (!$this->_storeManager->isSingleStoreMode()) {
    $this->addColumn(
        'store_id',
         [
             'header' => __('Store View'),
             'index' => 'store_id',
             'type' => 'store',
             'store_all' => true,
             'store_view' => true,
             'sortable' => false,
             'filter_condition_callback' => [$this, '_filterStoreCondition']
            ]
        );
    }

Related Snippets

How to disable widget block editor of WordPress?

How to loop sql table data inside a html table

PhpSpreadSheet: How to save Workbook sheets in individual CSV files

How to get the ID of the link in another page in php

Nginx RTMP not recording

How to generate QR CODE for dynamic generating link and logo using Simple QrCode in laravel?

How to get company posts from LinkedIn via API?

PHP error: "The zip extension and unzip command are both missing, skipping."

How to fix 'Data has already been sent to output, unable to output PDF file' in MPDF

how to sort by a custom appended relation to model

Undefined Array Key error when uploading image on php

Failing validation doesn't stop code execution in livewire component

How to run a shell as root from php (apache)

Symfony - "framework.test" config is not set to true

Laravel Passport - Not able to get token string in response?

About Contact Privacy policy Terms and conditions