addColumn('no', 'no'); $this->addColumn('date-range', 'startDate', array('title' => 'Date', 'orderBy' => 'startDate')); $this->addColumn('text', 'title', array('title' => 'Title', 'orderBy' => 'title')); $this->addColumn( 'event-type', 'type', array( 'title' => 'Type', 'values' => View::$eventTypes, 'committeeUrl' => CommitteeView::getPage('url') ) ); $this->addColumn( 'attendeeCount', 'id', array( 'title' => 'Attendees', 'urlPattern' => $this->_getAttendeeViewUrl() ) ); $this->addColumn( 'link_enum', 'show', array( 'title' => 'Show', 'values' => $this->_yesNoArray, ) ); $this->addColumn( 'options', 'options', array( 'actions' => array( 'newAttendee' => array('title' => 'Add Attendee', 'linkTitle' => 'Add Attendee to this Event'), 'edit' => array(), 'delete' => array(), ) ) ); return $this; } protected function _getAttendeeViewUrl() { if (($url = AttendeeView::getPage('url'))) { $url .= '/%d'; } return $url; } }