• 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 can I make a full text index of the column?

curl returning 301 error after migrating to https

backup files to google drive using PHP

Select option menu read from database and use it's values

Correct way to use LIKE '%{$var}%' with prepared statements?

How to convert the int value to inch in PHP [closed]

How to use PHPCBF to fix one issue at a time?

Login if user is active using Laravel Breeze

PHP: remove filename from path

Adding one microsecond to Datetime object in PHP

Update Order custom Field value with WooCommerce REST API

Adding custom body class to the custom archive pages

SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'name' cannot be null

Hi, I am making a contact form thingy, and my php isn't working any reason why?

How to access a var with "-" in PHP [duplicate]

About Contact Privacy policy Terms and conditions