• 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

401 Unauthorized only occurring on some pages in Laravel 8

PHP: PDO + CSV export not downloading (headers issue?)

Do I need to install `fxp/composer-asset-plugin` if I'm not doing front-end development

What will the best solution for this multiple optional filter?

PHP file_get_contents function

Add record for each array elements if missing in table

Boolean assignment operators in PHP

WHM Enabling mod_rewrite

How to install php yaml on CentOs?

Using PHP to connect to a remote MSSQL database

Laravel: Why is my variable not being set while it's in the construct function of the controller?

run a query using EXECUTE BLOCK to prepair a column for an unique-Index

How can I make a full text index of the column?

Split comma separated value from table column into rows using mysql?

How to change the app environment at run time?

About Contact Privacy policy Terms and conditions