addColumn('no', 'no'); $this->addColumn('text', 'attendeeName', ['orderBy' => 'attendeeName']); $this->addColumn('date', 'eventStartDate', ['orderBy' => 'eventStartDate', 'title' => 'Event Date']); $this->addColumn('text', 'eventName', ['orderBy' => 'eventName', 'title' => 'Event Name']); $this->addColumn('date', 'registrationDate', ['orderBy' => 'registrationDate']); $this->addColumn('text', 'statusTitle', ['orderBy' => 'statusTitle', 'title' => 'Attendance Status']); $this->addColumn('money', 'amount', ['orderBy' => 'amount', 'title' => 'Amount', 'emptyText' => '-']); $this->addColumn( 'options', 'options', [ 'actions' => [ 'edit' => ['formattedLink' => $this->getActionUrl('edit')], 'delete' => ['formattedLink' => $this->getActionUrl('delete')] ], 'params' => ['eventId', 'id'] ] ); return $this; } protected function getActionUrl($action) { static $attendeeUrl; if (null === $attendeeUrl) { $attendeeUrl = AttendeeView::getPage('url'); } return $attendeeUrl . '/%d/?action=' . $action . '&id=%d&sessionName=' . constant('CURRENT_PAGE'); } }