• 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

Laravel php artisan serve to mimic HTTPS

How do I do HTTP basic authentication using Guzzle?

How to properly set "0000-00-00 00:00:00" as a DateTime in PHP

How to submit a form when page loads using JavaScript?

Merge key and value of array index [duplicate]

PHP 8 - libxml_disable_entity_loader() has been deprecated. How do I replace the functionality it provides?

Laravel Database Strict Mode

PHP: How to raise number to (tiny) fractional exponent?

how to make my own auto increment in php?

How to pass data to all views in Laravel 5?

Prestashop cUrl Login

Apply session id from request header

shell errors running php exec

How to auto populate preferredCountries from intl-tel-input with db output

browsersync doesn't work with XAMPP

About Contact Privacy policy Terms and conditions