• 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

PHP array stringify

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

hidden INPUT value not available in $_POST

Move a child array to parent array and change parent/child name

yii2 and mssql insert varbinary into model

Multiple order by in WooCommerce

Correct way to use LIKE '%{$var}%' with prepared statements?

stay with the last 15 elements of an array [duplicate]

What will the best solution for this multiple optional filter?

Prestashop webservice API creating cart rules

PHP - Check if string contains words longer than 4 characters, then include "+ *", and for those shorter than 4 characters include only "*"

Results page in other window

Unsure why I am getting: Number of variables doesn't match number of parameters in prepared statement

Laravel display validation error

Wordpress how to get the post thumbnail inside a figure tag

About Contact Privacy policy Terms and conditions