/** * @param array $context * * @return string */ public function toHtml($context = []) { $attrs = ['id' => $this->invitation->getId(), 'type' => $this->invitation->getType()]; return app()->viewHelper()->partial('platform/user/invitation/request-membership', ['headline' => $this->getHeadline(), 'poster' => $this->invitation->getPoster(), 'parent' => $this->invitation->getParent(), 'request' => $this->invitation, 'attrs' => $attrs]); }
/** * @param Invitation $invitation */ public function onAcceptRequestMembershipUser(Invitation $invitation) { /** * current viewer called to accept data */ $poster = $invitation->getPoster(); $parent = $invitation->getParent(); app()->relation()->acceptMembershipRequest($poster, $parent, false); }
/** * @param array $params * * @return string */ public function toHref($params = []) { return $this->invitation->getPoster()->toHref($params); }