48 \
Magento\Backend\Model\Session $backendSession
50 $this->_backendSession = $backendSession;
51 parent::__construct($context);
62 $this->_storageId = $storageId;
74 $this->_backendSession->setData($this->
_getStorageKey(), $this->_items);
86 if ($this->_items ===
null) {
87 $this->_items = (array)$this->_backendSession->getData($this->_getStorageKey());
100 if ($position ===
false || $position == count($this->_items) - 1) {
104 return $this->_items[$position + 1];
116 if ($position ===
false || $position == 0) {
120 return $this->_items[$position - 1];
132 return array_search(
$value, $this->_items);
143 if (!$this->_storageId) {
144 throw new LocalizedException(
__(
"The storage key wasn't set. Add the storage key and try again."));