/** * {@inheritDoc} * * @throws FormException When the field is in mode HybridField::FIELD adding * subfields is not allowed */ public function add(FieldInterface $field) { if ($this->mode === self::FIELD) { throw new FormException('You cannot add nested fields while in mode FIELD'); } return parent::add($field); }