ltsecurityinc安防产品在线商城代码
This commit is contained in:
+24
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* @author Amasty Team
|
||||
* @copyright Copyright (c) Amasty (https://www.amasty.com)
|
||||
* @package Admin Actions Log for Magento 2
|
||||
*/
|
||||
|
||||
namespace Amasty\AdminActionsLog\Model\LoginAttempt\ResourceModel;
|
||||
|
||||
use Amasty\AdminActionsLog\Model\LoginAttempt\LoginAttempt as LoginAttemptModel;
|
||||
use Amasty\AdminActionsLog\Model\LoginAttempt\ResourceModel\LoginAttempt as LoginAttemptResource;
|
||||
use Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection;
|
||||
|
||||
class Collection extends AbstractCollection
|
||||
{
|
||||
public function _construct()
|
||||
{
|
||||
$this->_init(LoginAttemptModel::class, LoginAttemptResource::class);
|
||||
$this->_setIdFieldName($this->getResource()->getIdFieldName());
|
||||
}
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* @author Amasty Team
|
||||
* @copyright Copyright (c) Amasty (https://www.amasty.com)
|
||||
* @package Admin Actions Log for Magento 2
|
||||
*/
|
||||
|
||||
namespace Amasty\AdminActionsLog\Model\LoginAttempt\ResourceModel\Grid;
|
||||
|
||||
use Magento\Framework\View\Element\UiComponent\DataProvider\SearchResult;
|
||||
|
||||
class Collection extends SearchResult
|
||||
{
|
||||
/**
|
||||
* @return \Magento\Framework\Api\Search\DocumentInterface[]
|
||||
*/
|
||||
public function getItems()
|
||||
{
|
||||
$this->_setIsLoaded(false);
|
||||
$this->_items = [];
|
||||
$searchCriteria = $this->getSearchCriteria();
|
||||
$this->setPageSize($searchCriteria->getPageSize());
|
||||
$this->setCurPage($searchCriteria->getCurrentPage());
|
||||
|
||||
return parent::getItems();
|
||||
}
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* @author Amasty Team
|
||||
* @copyright Copyright (c) Amasty (https://www.amasty.com)
|
||||
* @package Admin Actions Log for Magento 2
|
||||
*/
|
||||
|
||||
namespace Amasty\AdminActionsLog\Model\LoginAttempt\ResourceModel;
|
||||
|
||||
use \Amasty\AdminActionsLog\Model\LoginAttempt\LoginAttempt as LoginAttemptModel;
|
||||
use Magento\Framework\Model\ResourceModel\Db\AbstractDb;
|
||||
|
||||
class LoginAttempt extends AbstractDb
|
||||
{
|
||||
public const TABLE_NAME = 'amasty_audit_login_attempts';
|
||||
|
||||
protected function _construct()
|
||||
{
|
||||
$this->_init(self::TABLE_NAME, LoginAttemptModel::ID);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user