diff --git a/Views/View.php b/Views/View.php index 2fe6f5182..e70f41baa 100644 --- a/Views/View.php +++ b/Views/View.php @@ -104,6 +104,20 @@ class View extends ViewAbstract $this->l11n = $response !== null ? $response->getHeader()->getL11n() : new Localization(); } + /** + * Check if data exists + * + * @param string $id Data Id + * + * @return bool + * + * @since 1.0.0 + */ + public function hasData(string $id) : bool + { + return isset($this->data[$id]); + } + /** * Get data attached to view *