• 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

Target Individual Form Instance/Counter Inside A PHP While Loop

Laravel implode array items to new lines

How can I make good efficent AJAX live forms with just jQuery and

Laravel Passport - Not able to get token string in response?

OctoberCMS / Anonymous Global Scope

Insert a DIV after the 6th product only once in WooCommerce category archives

How to get multiple values with same key from an array PHP

Laravel database insert with combining array and string

Fatal error: [] operator not supported for strings

PHP Array split string and Integers

Form repeater send wrong data with last element in Laravel

Can't remotely connect to MySQL error (13) with PHP script, connecting through CLI works

How to get rid of ampersand using WP Nonce URL and WP Redirect or PHP header

RabbitMQ PRECONDITION_FAILED - unknown delivery tag

NGINX: connect() to unix:/var/run/php7.2-fpm.sock failed (2: No such file or directory)

About Contact Privacy policy Terms and conditions