• 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

Symfony 4: how to allow dynamic values for array nodes in bundle configuration?

How to update array value in Laravel

how to make my own auto increment in php?

"There is no active transaction" when refreshing database in Laravel 8.0 test

GuzzleHttp Hangs When Using Localhost

WAMP Virtual Host not working

The difference when using if statement true === something() vs something() === true [duplicate]

Input and output values for php into the browser?

Exact alternate to mcrypt_encrypt in PHP 7.2

Laravel Pagination links() not working

How to properly set "0000-00-00 00:00:00" as a DateTime in PHP

PHP array stringify

Warning: sqlite_query() expects parameter 1 to be resource, string given

Error loading MySQLdb Module 'Did you install mysqlclient or MySQL-python?'

php script to delete files older than 24 hrs, deletes all files

About Contact Privacy policy Terms and conditions