• 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 5 controller sending JSON integer as string

MySQL default time format UTC or GMT?

How to set time with DateTime modify?

How To Access A Column In M-M Relationship Table In Laravel

Problem with fetching data from database in Laravel

How can I access an array/object?

How to downgrade or install a specific version of Composer?

phpseclib 2.0 can not use Composer to create autoload

Can't call javascript alert alertify library from PHP

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource [duplicate]

Laravel after login Two factor not working

XAMPP/SQLSRV: Unable to find Sqlsrv in PHPINFO(); - errors coming from connection

Sum column values from multiple arrays

shell errors running php exec

oauth-private.key does not exist or is not readable

About Contact Privacy policy Terms and conditions