• 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

get folder directory from input type file - PHP

How to override htaccees file for cache control header

How to programmatically find public properties of a class from inside one of it's methods

Error loading MySQLdb Module 'Did you install mysqlclient or MySQL-python?'

Detect if PHP session exists

How to make a array inside array?

Search for array row with specific column value and return another value from qualifying row

woocommerce get_order_report_data to show order_item_id

how to retrieve the first and last instance of a row in pdo dataset

Is there an equivalent of DynamoDB on Azure as a PHP session Handler

How to change the app environment at run time?

Autoloading classes in PHPUnit using Composer and autoload.php

How to use React Router with Laravel?

woocommerce_wp_select options array from product attribute terms

How do I enable error reporting in Laravel?

About Contact Privacy policy Terms and conditions