/**
* Is this element required in the UI? (Prevents the user from being able
* to remove the element.).
*
* @param BaseEventTypeElement $element
*
* @return bool
*/
public function isRequiredInUI(\BaseEventTypeElement $element)
{
if (isset($this->mandatoryElements)) {
foreach ($this->mandatoryElements as $mandatoryElement) {
if (get_class($element) === $mandatoryElement->class_name) {
return true;
}
}
}
return parent::isRequiredInUI($element);
}