• 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

PHP | "The requested PHP extension bcmath is missing from your system."

codeigniter 4 running error first time with xampp

php file upload scanning using clamav, permissions on /tmp/

Respond with status code 401 on authentication failure using Laravel and Passport?

Check if user online laravel

How to modify CSS in a specific page of the WP admin dashboard (backend)

How to send upload image through email

Adding Multiple Custom Post Types in Wordpress

Unable to uninstall brew php from homebrew

IlluminateDatabaseQueryException could not find driver [duplicate]

Add a text next to stock quantity if it is less than 10 in Woocommerce single product

Exception thrown during the rendering of a template("Parameter "id" for route "url" must match "[^/]++" ("" given) to generate a corresponding URL.")

Component install error: JInstaller: :Install: File does not exist

How to add class name to an existing tag in php

PHP7 CLI attempts to load xdebug twice - "Cannot load Xdebug - it was already loaded"

About Contact Privacy policy Terms and conditions