getMethod(); if (0 == strcasecmp($_SERVER['REQUEST_METHOD'], $method)) { $data = Qs_Request::get($method); $itemIdMatched = true; if (($itemId = $this->getCmsItemId())) { $itemIdMatched = (isset($data['__idItem']) && $data['__idItem'] == $itemId); } return ($itemIdMatched && 0 === strpos($data['action'], 'insert')); } return false; } public function getHasSpouse() { return $this->_hasSpouse; } public function setHasSpouse($hasSpouse) { $this->_hasSpouse = $hasSpouse; } public function getHasStatus() { return $this->_hasStatus; } public function setHasStatus($hasStatus) { $this->_hasStatus = $hasStatus; return $this; } protected function _initElements() { $defaults = (array) $this->_getDefaults(); if (count($defaults) > $this->getMaxAttendeeCount()) { $defaults = array_slice($defaults, 0, $this->getMaxAttendeeCount(), true); } if ($this->getAllowNonMembers() || $this->getAllowMembers()) { $itemOptions = [ 'adminMode' => $this->_adminMode, 'editMode' => $this->_editMode, 'renderMode' => $this->getRenderMode(), 'isSpouse' => $this->getIsSpouse(), 'hasSpouse' => $this->getHasSpouse(), 'hasStatus' => $this->getHasStatus(), 'event' => $this->getEvent(), 'allowDelete' => $this->getAllowDelete(), 'allowMembers' => $this->getAllowMembers(), 'allowNonMembers' => $this->getAllowNonMembers(), 'allowCurrentUser' => $this->getAllowCurrentUser(), 'allowStatusChange' => $this->isAllowStatusChange(), 'currentUserId' => $this->getCurrentUserId(), 'currentUserName' => $this->getCurrentUserName(), 'showStaticAttendeeType' => $this->getShowStaticAttendeeType(), 'deletedMemberAttendee' => $this->getDeletedMemberAttendee(), 'userAutocompleteUrl' => $this->getUserAutocompleteUrl(), ]; foreach ($defaults as $index => $data) { $itemOptions['defaults'] = (array) $data; $itemOptions['index'] = $index; $form = new AttendeeItemForm($itemOptions); $this->addSubForm($form, (string) $index); } } return $this; } public function isAllowStatusChange() { return $this->_allowStatusChange; } public function setAllowStatusChange($allowStatusChange) { $this->_allowStatusChange = $allowStatusChange; return $this; } public function loadDefaultDecorators() { if (false == $this->loadDefaultDecoratorsIsDisabled() && null == $this->getDecorators()) { if (NewForm::RENDER_MODE_ATTENDEE === $this->getRenderMode()) { $this->addDecorator('FormElements'); } else { $this->addDecorator('FormElements') ->addDecorator('DtDdWrapper'); } } return $this; } public function initRender() { parent::initRender(); if (($decorator = $this->getDecorator('HtmlTag'))) { $decorator->setOption('id', $this->getId()); } return $this; } public function setRenderMode($renderMode) { $this->_renderMode = $renderMode; return $this; } public function getRenderMode() { return $this->_renderMode; } public function setIndex($index) { $this->_index = (int) $index; return $this; } public function getIndex() { return $this->_index; } public function setMaxAttendeeCount($maxAttendeeCount) { $this->_maxAttendeeCount = $maxAttendeeCount; return $this; } public function getMaxAttendeeCount() { return $this->_maxAttendeeCount; } public function setAllowMembers($allowMembers) { $this->_allowMembers = $allowMembers; return $this; } public function getAllowMembers() { return $this->_allowMembers; } public function setAllowNonMembers($allowNonMembers) { $this->_allowNonMembers = $allowNonMembers; return $this; } public function getAllowNonMembers() { return $this->_allowNonMembers; } public function setShowStaticAttendeeType($showStaticAttendeeType) { $this->_showStaticAttendeeType = $showStaticAttendeeType; return $this; } public function getShowStaticAttendeeType() { return $this->_showStaticAttendeeType; } public function getDeletedMemberAttendee() { return $this->_deletedMemberAttendee; } public function setDeletedMemberAttendee($message) { $this->_deletedMemberAttendee = $message; return $this; } public function setCurrentUserId($currentUserId) { $this->_currentUserId = $currentUserId; return $this; } public function getCurrentUserId() { return $this->_currentUserId; } public function getCurrentUserName() { return $this->_currentUserName; } public function setCurrentUserName($currentUserName) { $this->_currentUserName = $currentUserName; return $this; } public function setAllowCurrentUser($allowCurrentUser) { $this->_allowCurrentUser = $allowCurrentUser; return $this; } public function getAllowCurrentUser() { return $this->_allowCurrentUser; } public function setUserAutocompleteUrl($userAutocompleteUrl) { $this->_userAutocompleteUrl = $userAutocompleteUrl; return $this; } public function getUserAutocompleteUrl() { return $this->_userAutocompleteUrl; } public function setAllowDelete($allowDelete) { $this->_allowDelete = $allowDelete; return $this; } public function getAllowDelete() { return $this->_allowDelete; } public function getEvent() { if (null == $this->_event) { throw new \Exception('Required property "' . __CLASS__ . '->_event" is missing'); } return $this->_event; } public function setEvent(array $event) { $this->_event = $event; return $this; } public function getEditMode() { return $this->_editMode; } public function getAdminMode() { return $this->_adminMode; } public function setAdminMode($adminMode) { $this->_adminMode = $adminMode; return $this; } public function setEditMode($editMode) { $this->_editMode = $editMode; return $this; } public function getIsSpouse() { return $this->_isSpouse; } public function setIsSpouse($isSpouse) { $this->_isSpouse = $isSpouse; return $this; } }