27 lines
581 B
PHP
27 lines
581 B
PHP
<?php
|
|
|
|
namespace KupShop\AdminBundle\Util;
|
|
|
|
trait AdminTestTrait
|
|
{
|
|
protected function adminLogin(int $adminID)
|
|
{
|
|
$this->get(LegacyAdminCredentials::class)->setLoginSession($adminID);
|
|
}
|
|
|
|
protected function adminLogout()
|
|
{
|
|
$this->get(LegacyAdminCredentials::class)->unsetLoginSession();
|
|
}
|
|
|
|
protected function isLogged()
|
|
{
|
|
return $this->get(LegacyAdminCredentials::class)->isLogged();
|
|
}
|
|
|
|
protected function loginByHash($token)
|
|
{
|
|
return $this->get(LegacyAdminCredentials::class)->loginByHash($token);
|
|
}
|
|
}
|