• 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

How to downgrade or install a specific version of Composer?

How to retrieve Active Directory group policy maximum password age using LDAP

Querying only one row from a one to many relationship laravel

Laravel with App Engine Standard Class 'FacadeIgnitionIgnitionServiceProvider' not found

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

Add record for each array elements if missing in table

protect images from being copied

How to run a shell as root from php (apache)

PHP SoapClient: set a namespace without prefix

Convert PHP array into HTML tag attributes separated by spaces

Correct way to use LIKE '%{$var}%' with prepared statements?

How to loop sql table data inside a html table

Phpunit partial mock + proxy Entity

CodeIgniter force_download is not working

php curl requesting twice

About Contact Privacy policy Terms and conditions