Exemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function getUiComponent($name)
 {
     $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getUiComponent');
     if (!$pluginInfo) {
         return parent::getUiComponent($name);
     } else {
         return $this->___callPlugins('getUiComponent', func_get_args(), $pluginInfo);
     }
 }
Exemplo n.º 2
0
 /**
  * 2015-09-19
  * Цель метода — получение информации о формируемом в данный момент компоненте
  * с целью индивидуального языкового перевода его интерфейса.
  * @see \Magento\Framework\View\Layout::renderNonCachedElement()
  * @param Sb $sb
  * @param \Closure $proceed
  * @param string $name
  * @return string
  */
 public function aroundRenderNonCachedElement(Sb $sb, \Closure $proceed, $name)
 {
     /** @var UiComponent|null $wrapper */
     $wrapper = $sb->isUiComponent($name) ? $sb->getUiComponent($name) : null;
     /** @var string $result */
     $wrapper ? df_state()->componentSet($wrapper->component) : null;
     try {
         $result = $proceed($name);
     } finally {
         $wrapper ? df_state()->componentSetPrev() : null;
     }
     return $result;
 }