Add function to check data

This commit is contained in:
Dennis Eichhorn 2020-04-24 18:08:12 +02:00
parent 86e8ae40de
commit b6ea99b75c

View File

@ -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
*