• 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

PDOException SQLSTATE[HY000] [2002] No such file or directory

Natural ORDER in Laravel Eloquent ORM

onKeyUp event calculation not working on the following rows from php generated forms except the first one

Prestashop webservice API creating cart rules

How to validate tin and cst using PHP?

Fatal error: Uncaught TypeError: count(): Argument #1 ($var) must be of type Countable|array, null given in

Read users and passwords from a txt file

Phalcon: setStatusCode returns empty response

storagelogs/laravel.log" could not be opened in append mode: failed to open stream: Permission denied

Docker image build with PHP zip extension shows "bundled libzip is deprecated" warning

"Mixed content blocked" when running an HTTP AJAX operation in an HTTPS page

PHP DOTENV unable to load env vars

XSS attack still works despite htmlspecialchars() doing its work

Multiply each value in array using array_map function

Call to a member function fetch_field() on a non-object MySQLiDB

About Contact Privacy policy Terms and conditions