+ return in_array($format, (array) $this->format, TRUE);
+ }
+
+ /**
+ * Adds cacheability if applicable.
+ *
+ * @param array $context
+ * Context options for the normalizer.
+ * @param $data
+ * The data that might have cacheability information.
+ */
+ protected function addCacheableDependency(array $context, $data) {
+ if ($data instanceof CacheableDependencyInterface && isset($context[static::SERIALIZATION_CONTEXT_CACHEABILITY])) {
+ $context[static::SERIALIZATION_CONTEXT_CACHEABILITY]->addCacheableDependency($data);
+ }