_initTitleElement(); $this->addElement('hidden', 'attendType', ['value' => self::ATTEND_OTHER]); $attendees = $this->_getData('attendee'); $options = [ 'defaults' => $attendees, 'renderMode' => self::RENDER_MODE_FULL, 'maxAttendeeCount' => 1, 'allowDelete' => false, 'allowMembers' => $this->getAllowMembers(), 'allowNonMembers' => $this->getAllowNonMembers(), 'userAutocompleteUrl' => $this->getUserAutocompleteUrl(), 'showStaticAttendeeType' => true, ]; $key = key($attendees); if ((AttendeeForm::TYPE_MEMBER === $attendees[$key]['type'] && empty($attendees[$key]['id']))) { $msg = str_replace( ['{firstName}', '{lastName}'], [$attendees[$key]['firstName'], $attendees[$key]['lastName']], $this->getConfig('deletedMemberAttendee', '')); $options['deletedMemberAttendee'] = $msg; } $this->addSubForm(new AttendeeForm($options), 'attendee'); $this->_initPaymentGroupElement(); $this->removeElement('paymentNote'); return $this; } }