Skip to content

Commit 2fb57c1

Browse files
committed
fix: fix bug
1 parent 077a003 commit 2fb57c1

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

Model/InformationModel.php

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function __construct(
3636
\Magento\Framework\Webapi\Rest\Request $request,
3737
\Magento\Framework\Filesystem\Driver\File $driver,
3838
\Magento\Catalog\Model\ResourceModel\Product\CollectionFactory $productFactory,
39-
\Vuefront\Vuefront\Model\ResourceModel\Apps\Collection $appsFactory,
39+
// \Vuefront\Vuefront\Model\ResourceModel\Apps\Collection $appsFactory,
4040
\Vuefront\Vuefront\Model\Api\System\Startup $startup,
4141
\Magento\Store\Model\StoreManagerInterface $storeManager,
4242
\Magento\Framework\Module\Manager $moduleManager,
@@ -47,7 +47,8 @@ public function __construct(
4747
\Zend\Uri\Http $zendHttp,
4848
\Zend\Validator\File\Exists $zendFileExists,
4949
\Magento\Framework\Filesystem\Io\File $file,
50-
\Magento\Framework\Archive\Tar $arhiveTar
50+
\Magento\Framework\Archive\Tar $arhiveTar,
51+
\Vuefront\Vuefront\Model\AppsFactory $appsFactory
5152
) {
5253
$this->scopeConfig = $scopeConfig;
5354
$this->context = $context;
@@ -338,8 +339,13 @@ public function vfUpdate()
338339
}
339340

340341
public function vfApps() {
341-
$result = $this->appsFactory->addFieldToSelect('*')->load();
342-
var_dump($result);
342+
$apps = $this->appsFactory->create();
343+
$collection = $apps->getCollection();
344+
345+
foreach ($collection as $key => $value) {
346+
var_dump($value->getData());
347+
}
348+
343349
return [];
344350
}
345351

Model/ResourceModel/Apps.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@
44

55
class Apps extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb
66
{
7+
public function __construct(
8+
\Magento\Framework\Model\ResourceModel\Db\Context $context
9+
)
10+
{
11+
parent::__construct($context);
12+
}
13+
714
protected function _construct()
815
{
916
$this->_init('vuefront_apps', 'app_id');

0 commit comments

Comments
 (0)