Exemplo n.º 1
0
 /**
  * Retrieve block parameters
  *
  * @param mixed $value
  * @return array
  */
 protected function _getBlockParameters($value)
 {
     $tokenizer = new \Magento\Framework\Filter\Template\Tokenizer\Parameter();
     $tokenizer->setString($value);
     return $tokenizer->tokenize();
 }
Exemplo n.º 2
0
 /**
  * Return associative array of include construction.
  *
  * @param string $value raw parameters
  * @return array
  */
 protected function _getIncludeParameters($value)
 {
     $tokenizer = new \Magento\Framework\Filter\Template\Tokenizer\Parameter();
     $tokenizer->setString($value);
     $params = $tokenizer->tokenize();
     foreach ($params as $key => $value) {
         if (substr($value, 0, 1) === '$') {
             $params[$key] = $this->_getVariable(substr($value, 1), null);
         }
     }
     return $params;
 }