• 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

Redirect to previous page with php

SMTP ERROR: MAIL FROM command failed: 530 5.7.0 Must issue a STARTTLS command first when using PHPMailer

Unable to create lockable file - Laravel 8 & PHP 8

Issue with laravel eloquent model property

carbon generated datetime not stored correctly into the database

How to make a array inside array?

500 (Internal Server Error) with Laravel & Docker [duplicate]

Can't exclude directories from .htaccess mobile redirect?

How to get monthly wise data in laravel

Implode columnar values between two arrays into a flat array of concatenated strings

How to identify whether webp image is static or animated?

Woocommerce redirect after add-to-cart error

Symfony Error: "An exception has been thrown during the rendering of a template"

Yii2: How to download backup files using spanjeta/yii2-backup?

Put content of wordpress page inside div

About Contact Privacy policy Terms and conditions