You are here

class MarkupNormalizer in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/serialization/src/Normalizer/MarkupNormalizer.php \Drupal\serialization\Normalizer\MarkupNormalizer

Normalizes MarkupInterface objects into a string.

Hierarchy

Expanded class hierarchy of MarkupNormalizer

1 string reference to 'MarkupNormalizer'
serialization.services.yml in core/modules/serialization/serialization.services.yml
core/modules/serialization/serialization.services.yml
1 service uses MarkupNormalizer
serializer.normalizer.safe_string in core/modules/serialization/serialization.services.yml
Drupal\serialization\Normalizer\MarkupNormalizer

File

core/modules/serialization/src/Normalizer/MarkupNormalizer.php, line 13
Contains \Drupal\serialization\Normalizer\MarkupNormalizer.

Namespace

Drupal\serialization\Normalizer
View source
class MarkupNormalizer extends NormalizerBase {

  /**
   * The interface or class that this Normalizer supports.
   *
   * @var array
   */
  protected $supportedInterfaceOrClass = array(
    'Drupal\\Component\\Render\\MarkupInterface',
  );

  /**
   * {@inheritdoc}
   */
  public function normalize($object, $format = NULL, array $context = array()) {
    return (string) $object;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
MarkupNormalizer::$supportedInterfaceOrClass protected property The interface or class that this Normalizer supports. Overrides NormalizerBase::$supportedInterfaceOrClass
MarkupNormalizer::normalize public function Normalizes an object into a set of arrays/scalars. Overrides NormalizerInterface::normalize
NormalizerBase::checkFormat protected function Checks if the provided format is supported by this normalizer.
NormalizerBase::supportsDenormalization public function Implements \Symfony\Component\Serializer\Normalizer\DenormalizerInterface::supportsDenormalization() 1
NormalizerBase::supportsNormalization public function Checks whether the given class is supported for normalization by this normalizer. Overrides NormalizerInterface::supportsNormalization 1
SerializerAwareNormalizer::$serializer protected property
SerializerAwareNormalizer::setSerializer public function Sets the owning Serializer object. Overrides SerializerAwareInterface::setSerializer