• 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 redirect the user back to desired URL after login page in PHP?

merge all files in directory to one text file

how to see if database exists with PDO [duplicate]

How to submit a form when page loads using JavaScript?

Laravel csrf token mismatch for ajax POST Request

Json_Encode not returning html even i try to encode JSON_HEX_QUOT | JSON_HEX_TAG

Laravel print last executed SQL query with Query log

Detect if PHP session exists

Eloquent insert id with sequence next value

PHP array_filter with arguments

How to edit Records using CodeIgniter

hidden INPUT value not available in $_POST

Android Volley getParams() method not getting called for JsonObjectRequest

How to show a popup modal in codeIgniter?

Laravel Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) on a sub query with "ROW_NUMBER() OVER PARTITION"

About Contact Privacy policy Terms and conditions