Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions
LinkProvider Class Reference
Inheritance diagram for LinkProvider:
LinkProviderInterface

Public Member Functions

 __construct (LinkInterfaceFactory $linkFactory, FileInfoManager $fileInfoManager, StoreManagerInterface $storeManager)
 
 get ()
 

Detailed Description

Provides link to file with collected report data.

Definition at line 17 of file LinkProvider.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( LinkInterfaceFactory  $linkFactory,
FileInfoManager  $fileInfoManager,
StoreManagerInterface  $storeManager 
)
Parameters
LinkInterfaceFactory$linkInterfaceFactory
FileInfoManager$fileInfoManager
StoreManagerInterface$storeManager

Definition at line 39 of file LinkProvider.php.

43  {
44  $this->linkFactory = $linkFactory;
45  $this->fileInfoManager = $fileInfoManager;
46  $this->storeManager = $storeManager;
47  }

Member Function Documentation

◆ get()

get ( )

Returns
\Magento\Analytics\Api\Data\LinkInterface

Implements LinkProviderInterface.

Definition at line 74 of file LinkProvider.php.

75  {
76  $fileInfo = $this->fileInfoManager->load();
77  if (!$this->isFileReady($fileInfo)) {
78  throw new NoSuchEntityException(__('File is not ready yet.'));
79  }
80  return $this->linkFactory->create(
81  [
82  'url' => $this->getBaseUrl($fileInfo),
83  'initializationVector' => base64_encode($fileInfo->getInitializationVector())
84  ]
85  );
86  }
__()
Definition: __.php:13

The documentation for this class was generated from the following file: