Skip to content

Commit edab04e

Browse files
committed
New ViewModel
1 parent 4ed286a commit edab04e

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

ViewModel/SectionConfig.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
declare(strict_types=1);
3+
4+
namespace Loki\Base\ViewModel;
5+
6+
use Magento\Framework\App\Config\ScopeConfigInterface;
7+
use Magento\Framework\Session\Config;
8+
use Magento\Framework\View\Element\Block\ArgumentInterface;
9+
10+
class SectionConfig implements ArgumentInterface
11+
{
12+
public function __construct(
13+
private readonly ScopeConfigInterface $scopeConfig,
14+
) {
15+
}
16+
17+
public function getSectionDataLifeTime(): int
18+
{
19+
return (int)$this->scopeConfig->getValue('customer/online_customers/section_data_lifetime');
20+
}
21+
}

0 commit comments

Comments
 (0)