• 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

hidden INPUT value not available in $_POST

Unable to match results of php hash_hmac() and coldfusion hmac()

Using array_intersect on a multi-dimensional array

CodeIgniter 3 is generating a session file on each request, why?

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'posts.post' doesn't exist

What is the function of the (new Date()).getTime() in PHP?

PHP rotate matrix counter-clockwise

MySQL - Connection failed: No route to host

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

Trying to iterate over a mongodb cursor twice - failing

Creating command to backup MySql database in Laravel

Dynamic table in HTML using MySQL and php

How to downgrade or install a specific version of Composer?

Doctrine 2 mapping referencing unique key

Redirect to previous page with php

About Contact Privacy policy Terms and conditions