addColumn('no', 'no'); $this->addColumn('date', 'date', ['title' => 'Date', 'orderBy' => 'date']); $this->addColumn('registration-items', 'title', ['title' => 'Trade Show Name', 'orderBy' => 'title']); $this->addColumn('link_enum', 'enabled', ['title' => 'Show', 'orderBy' => 'enabled']); $this->addColumn('options', 'options', [ 'actions' => [ 'edit' => [], 'delete' => [ 'confirmMessage' => $this->getConfigArray('messages')['deleteConfirmation'], 'separator' => '
' ], 'addVendor' => [ 'formattedLink' => $this->getVendorBaseUrl(). '/%d?action=new', 'separator' => '
', 'linkTitle' => 'Add Vendor' ], 'addAttendee' => [ 'formattedLink' => $this->getAttendeeBaseUrl(). '/%d?action=new', 'separator' => '
', 'title' => 'Add Single Attendee', 'linkTitle' => 'Add Single Attendee' ], 'reports' => [ 'formattedLink' => $this->getVendorBaseUrl() . '/%d', 'title' => 'Vendors & Reports', 'linkTitle' => 'Vendors & Reports' ] ] ]); return $this; } protected function getVendorBaseUrl() { static $url; if (null === $url) { $url = VendorAdminView::getPage('url'); } return $url; } protected function getAttendeeBaseUrl() { static $url; if (null === $url) { $url = AttendeeAdminView::getPage('url'); } return $url; } public function toArray() { $item = parent::toArray(); $item['vendorBaseUrl'] = $this->getVendorBaseUrl(); $item['attendeeBaseUrl'] = $this->getAttendeeBaseUrl(); return $item; } }