• 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

Select option from dropdown menu with PHP and mySql

Laravel passport auth token not working after moving to different server

How to MODIFY a Google Docs document via API using search-and-replace?

Currently Using CodeIgniter Framework i have an Error

PHPMyAdmin not working as intended at remote server. Error 500, $respond not found

How to keep value of selected value after form submission?

Access denied for user 'homestead'@'localhost' (using password: YES)

Can I use a WooCommerce function without any WooCommerce page?

How to put php code inside opening and closing shortcodes

SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'name' cannot be null

Failed user login on production server using Symfony framework (Authentication request could not be processed due to...)

How to get median and quartiles/percentiles of an array in JavaScript (or PHP)?

PHP mail sending empty mails

PHP: Print caught exception like Xdebug

Make survey at laravel 5.4 and MySQL

About Contact Privacy policy Terms and conditions