• 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 override header set in Apache config with more specific header in a virtual host

Laravel : How to Create Dropdown to Select FOREIGN KEY from Other Table?

Laravel Sanctum CSRF not authenticating

auth pages not getting css in laravel

CSV to PHP class properties

hidden INPUT value not available in $_POST

How to disable widget block editor of WordPress?

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

Filter WooCommerce products with post__in and additional meta queries

How to get the survey List from surveygizmo API in the Postman?(Trial Version)

PHP: PDO + CSV export not downloading (headers issue?)

generating a random code in php?

Laravel Route issues with Route order in web.php

PHP Warning: Module already loaded in Unknown on line 0

PHP SoapClient: set a namespace without prefix

About Contact Privacy policy Terms and conditions