isRequiredInUI() public method

Is this element required in the UI? (Prevents the user from being able to remove the element.).
public isRequiredInUI ( BaseEventTypeElement $element ) : boolean
$element BaseEventTypeElement
return boolean
示例#1
0
 /**
  * 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);
 }