• 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

Doctrine 2 mapping referencing unique key

Convert PHP array into HTML tag attributes separated by spaces

Phpunit partial mock + proxy Entity

Converting IPv6 to IPv4 address in PHP

Image upload not working through ajax Laravel

How to use functions that are declared in snippets in Evolution CMS (Modx) in an external PHP Script?

How to submit a form when page loads using JavaScript?

Get latest Tweets - What API

PHP Startup Unable to load dynamic library /usr/lib/php/20151012/php_mysqli.dll

Cant seem to get the Pagination to work on my WooCommerce REST API application?

How to get quarter for future date using Carbon?

selected value from the listbox in php

woocommerce change position of price

sort() not affecting original array while inside foreach loop

Laravel Command Schedule Not Working Properly

About Contact Privacy policy Terms and conditions