149 parent::__construct($context,
$data);
175 return \Magento\Framework\App\ObjectManager::getInstance()->get(
190 if (!$this->customer) {
191 $this->customer = $this->customerDataFactory->create();
192 $data = $this->_backendSession->getCustomerData();
193 $this->dataObjectHelper->populateWithArray(
219 if (!$this->customerLog) {
220 $this->customerLog = $this->customerLogger->get(
239 \IntlDateFormatter::MEDIUM,
244 $this->_logger->critical($e);
256 return $this->_scopeConfig->getValue(
257 $this->_localeDate->getDefaultTimezonePath(),
272 \IntlDateFormatter::MEDIUM,
285 switch ($this->accountManagement->getConfirmationStatus(
$id)) {
287 return __(
'Confirmed');
289 return __(
'Confirmation Required');
291 return __(
'Confirmation Not Required');
293 return __(
'Indeterminate');
303 return $this->_storeManager->getStore(
316 $address = $this->accountManagement->getDefaultBillingAddress($this->
getCustomer()->getId());
318 return __(
'The customer does not have default billing address.');
322 return __(
'The customer does not have default billing address.');
325 return $this->addressHelper->getFormatTypeRenderer(
328 $this->addressMapper->toFlatArray(
$address)
372 return $this->_scopeConfig->getValue(
373 $this->_localeDate->getDefaultTimezonePath(),
397 if (!$lastLoginTime) {
398 return __(
'Offline');
404 if ($lastLogoutTime && strtotime($lastLogoutTime) > strtotime($lastLoginTime)) {
405 return __(
'Offline');
410 $currentTimestamp = (new \DateTime())->getTimestamp();
413 if ($lastVisitTime && $currentTimestamp - strtotime($lastVisitTime) > $interval * 60) {
414 return __(
'Offline');
430 return $this->
formatDate($date, \IntlDateFormatter::MEDIUM,
true);
446 $date = $this->_localeDate->scopeDate($this->
getCustomer()->getStoreId(), $date,
true);
447 return $this->
formatDate($date, \IntlDateFormatter::MEDIUM,
true);
460 $configValue = $this->_scopeConfig->getValue(
461 'customer/online_customers/online_minutes_interval',
475 $customerStatus =
__(
'Unlocked');
476 if ($customerModel->isCustomerLocked()) {
477 $customerStatus =
__(
'Locked');
479 return $customerStatus;
const CURRENT_CUSTOMER_ID
formatDate( $date=null, $format=\IntlDateFormatter::SHORT, $showTime=false, $timezone=null)
getStoreLastLoginDateTimezone()
const ACCOUNT_CONFIRMATION_NOT_REQUIRED
setCustomerRegistry(\Magento\Customer\Model\CustomerRegistry $customerRegistry)
getStoreCreateDateTimezone()
const ACCOUNT_CONFIRMATION_REQUIRED
const DEFAULT_ONLINE_MINUTES_INTERVAL
__construct(\Magento\Backend\Block\Template\Context $context, AccountManagementInterface $accountManagement, \Magento\Customer\Api\GroupRepositoryInterface $groupRepository, \Magento\Customer\Api\Data\CustomerInterfaceFactory $customerDataFactory, \Magento\Customer\Helper\Address $addressHelper, \Magento\Framework\Stdlib\DateTime $dateTime, \Magento\Framework\Registry $registry, Mapper $addressMapper, \Magento\Framework\Api\DataObjectHelper $dataObjectHelper, \Magento\Customer\Model\Logger $customerLogger, array $data=[])
getOnlineMinutesInterval()