Esempio n. 1
0
 /**
  * Return core flag model
  *
  * @return \Magento\Framework\Flag
  */
 protected function _getFlagModel()
 {
     if ($this->_flagModel === null) {
         $this->_flagModel = $this->_flagFactory->create(array('data' => array('flag_code' => $this->_flagCode)))->loadSelf();
     }
     return $this->_flagModel;
 }
Esempio n. 2
0
 /**
  * Return last request result
  *
  * @return array
  */
 protected function getFlagData()
 {
     $flag = $this->flagFactory->create(['data' => ['flag_code' => 'core']])->loadSelf();
     if ($flag->getFlagData()) {
         $data = @unserialize(@base64_decode($flag->getFlagData()));
         if (is_array($data)) {
             return $data;
         }
     }
     return [];
 }