• 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

Send same name multiple checkbox values via ajax

(PHPUnit) PHP Fatal error: Uncaught Error: Call to undefined function each()

How to find phpcs current default standard

Add custom text under order details on WooCommerce My account view order pages

oauth-private.key does not exist or is not readable

Symfony autowiring issues since docker update

Xdebug can't connect back to Docker host

phpmyadmin : Depends: php-twig (>= 2.9) but 2.6.2-2 is to be installed. WHAT?

Why does codeigniter & Linux server throws unserialize() session data error when user tries to login

HTML and PHP in one file

How to change the app environment at run time?

How can I get a div content in php

Sort a multidimensional array by integer inside of a string value which is two levels down

PHP DOTENV unable to load env vars

PHP usort() order in case of equality

About Contact Privacy policy Terms and conditions