/** * 2016-11-20 * У класса @see \Magento\Framework\Data\Form\Element\AbstractElement * метод getComment() — магический. * К магическим методам плагины не применяются. * Поэтому для задействования плагина необходимо унаследоваться от класса ядра * и явно объявить в своём классе метод getComment(). * Примеры: * @see \Df\Framework\Form\Element\Checkbox::getComment() * @see \Df\Framework\Form\Element\Text::getComment() * @used-by \Magento\Config\Block\System\Config\Form\Field::_renderValue() * https://github.com/magento/magento2/blob/2.1.0/app/code/Magento/Config/Block/System/Config/Form/Field.php#L82-L84 * @param Sb $sb * @param string $result * @return string */ public function afterGetComment(Sb $sb, $result) { /** @var string|null $vc */ $vc = df_fe_fc($sb, 'dfValidator'); if ($vc) { /** @var \Df\Framework\IValidator $v */ $v = df_o($vc); /** @var Phrase|Phrase[]|true $messages */ $messages = $v->check($sb); if (true !== $messages) { $result .= df_tag_list(df_array($messages), false, 'df-enabler-warnings'); } } return $result; }
/** * 2016-01-29 * @param AE|E $e * @param string $key * @param int|null|callable $default [optional] * @return int */ function df_fe_fc_i(AE $e, $key, $default = 0) { return df_int(df_fe_fc($e, $key, $default)); }
/** * 2015-11-17 * @used-by \Df\Framework\Form\Element\ArrayT::itemType() * @param string|null $key [optional] * @param string|null|callable $default [optional] * @return string|null|array(string => mixed) */ protected function fc($key = null, $default = null) { return df_fe_fc($this, $key, $default); }
/** * 2016-05-30 * @return string|null */ protected function routePath() { return dfc($this, function () { return df_fe_fc($this, 'dfWebhook_routePath'); }); }