示例#1
0
 /**
  * {@inheritdoc}
  */
 public function getRequiredGroups($fieldPrefix = '')
 {
     $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getRequiredGroups');
     if (!$pluginInfo) {
         return parent::getRequiredGroups($fieldPrefix);
     } else {
         return $this->___callPlugins('getRequiredGroups', func_get_args(), $pluginInfo);
     }
 }
示例#2
0
 /**
  * Get css class for "requires" functionality
  *
  * @param \Magento\Config\Model\Config\Structure\Element\Field $field
  * @param string $fieldPrefix
  * @return string
  */
 protected function _getRequiresCssClass(\Magento\Config\Model\Config\Structure\Element\Field $field, $fieldPrefix)
 {
     $requiresClass = '';
     $requiredPaths = array_merge($field->getRequiredFields($fieldPrefix), $field->getRequiredGroups($fieldPrefix));
     if (!empty($requiredPaths)) {
         $requiresClass = ' requires';
         foreach ($requiredPaths as $requiredPath) {
             $requiresClass .= ' requires-' . $this->_generateElementId($requiredPath);
         }
         return $requiresClass;
     }
     return $requiresClass;
 }