• 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

how to retrieve the first and last instance of a row in pdo dataset

PHP cURL (SSL certificate problem: self signed certificate in certificate chain)

How to convert a carbon into string, to take the date only?

Get keys from associative array [duplicate]

How to test a php login connected to a mysql db through xampp?

Attempt to read property "view" on null when sending password reset email

Phalcon: setStatusCode returns empty response

Laravel update hasMany relationship using saveMany

Composer Warning: openssl extension is missing. How to enable in WAMP

Cross-Origin Resource Sharing (CORS) witth Laravel and Vuejs

PHP only Hit Counter?

PHP Deprecated issue when running artisan command

Google Calendar API batch request PHP

Laravel 8 factory state afterCreating

Xdebug can't connect back to Docker host

About Contact Privacy policy Terms and conditions