1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
    //magento 方法
protected function _addColumnFilterToCollection($column)
    {
        if ($column->getId() == 'in_users') {
            $userIds = $this->_getSelectedUsers();
            if (empty($userIds)) {
                $userIds = 0;
            }
            if ($column->getFilter()->getValue()) {
                $this->getCollection()->addFieldToFilter('main_table.user_id', ['in' => $userIds]);
            } else if ($userIds) {
                $this->getCollection()->addFieldToFilter('main_table.user_id', ['nin' => $userIds]);
            }
        } else {
            parent::_addColumnFilterToCollection($column);
        }

        return $this;
    }
[php] //magento 方法 protected function _addColumnFilterToCollection($column) { if ($column->getId() == ‘in_users’) { $userIds = $this->_getSelectedUsers(); if (empty($userIds)) { $userIds = 0; } if ($column->getFilter()->getValue()) { $this->getCollection()->addFieldToFilter(‘main_table.user_id’, [‘in’ => $userIds]); } else if ($userIds) { $this->getCollection()->addFieldToFilter(‘main_table.user_id’, [‘nin’ => $userIds]); } } else { parent::_addColumnFilterToCollection($column); } return $this; } [/php]

1
2
3
4
5
6
7
8
/**
         * Comment
         */
        function hello() {
          echo "Hello!";
          return null;
        }
        exit();

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
php bin/magento setup:upgrade
#php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
#php bin/magento setup:static-content:deploy zh_Hans_CN -f
#chmod -R 755 .
#find . -type f -exec chmod 644 {} \;
#find . -type d -exec chmod 755 {} \;
#find ./generated -type d -exec chmod 777 {} \;
#find ./var -type d -exec chmod 777 {} \;
#find ./pub/media -type d -exec chmod 777 {} \;
#find ./pub/static -type d -exec chmod 777 {} \;
#find ./pub/opt -type d -exec chmod 777 {} \;
#rm -rf var/log/*
#rm -rf var/report/*
chmod -R 777 pub/media
chmod -R 777 pub/static
chmod -R 777 pub/opt
chmod -R 777 generated
chmod -R 777 var
chmod -R 777 deploy.sh
/** * Comment */ function hello() { echo “Hello!”; return null; } exit();

Aaaaaaa


1
2
3
4
5
6
7
8
<?xml version="1.0"?>
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <container name="content" label="Root">
        <block class="\Vendorname\Modulename\Block\Adminhtml\Edit\Tab\Tabname" name="Credit.edit.tab.credit"  template="Vendorname_Modulename::credit.phtml" />
       
    </container>
   
</layout>

发表评论

电子邮件地址不会被公开。 必填项已用*标注