<?php
/**
* @version EC=CUBE4
* @copyright 株式会社 翔 kakeru.co.jp
* @author
* 2022年01月15日作成
*
* app\Customize\Service\CustomerService.php
*
* AutoLoadService
*
*
* C= C= C= ┌(;・_・)┘トコトコ
******************************************************/
namespace Customize\Service;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\HttpFoundation\RequestStack;
use Customize\Service\CommonService;
use Lm\Service\Db\SqlService;
class AutoLoadService
{
const NARIKAWARI_SESSON = 'NARIKAWARI_SESSON';
protected $CommonService;
protected $Container;
protected $Session;
protected $Request;
public function __construct(
ContainerInterface $Container
,RequestStack $RequestStack
,CommonService $CommonService
)
{
$this->CommonService = $CommonService;
$this->Container = $Container;
$this->Request = $RequestStack->getCurrentRequest();
}
public function GetNariKawariSession($remove= false)
{
$Session = $this->Request->getSession();
$Data = $Session->get(self::NARIKAWARI_SESSON);
if ($remove){
$Session->set(self::NARIKAWARI_SESSON,null);
}
return $Data;
}
public function RemoveNariKawariSession()
{
$Session = $this->Request->getSession();
$Session->set(self::NARIKAWARI_SESSON, null);
}
public function GetNariKawariFormData()
{
$Ladio = $this->CommonService->GetYaml('Narikawari_Radio.yaml');//oh_jhouhou
$Sql = new SqlService();
$EigyoData = $Sql->Table('kakunin_eigyou_table')
->Set('eigyou_order_list', 1)
->Order('eigyou_id')
->FindAll();
return [$Ladio, $EigyoData];
}
}