/** * {@inheritdoc} */ protected function setDefaultOptions(OptionsResolver $resolver) { parent::setDefaultOptions($resolver); $resolver->setTypesAllowed(['attachments' => '\\Crummy\\Phlack\\Message\\Collection\\AttachmentCollection']); $resolver->setNormalizers(['icon_emoji' => function (Options $options, $value) { return empty($value) ? $value : sprintf(':%s:', trim($value, ':')); }]); }
/** * {@inheritdoc} */ protected function setDefaultOptions(OptionsResolver $resolver) { parent::setDefaultOptions($resolver); $resolver->setTypesAllowed(['fields' => '\\Crummy\\Phlack\\Message\\Collection\\FieldCollection']); }