/** * Load the datagrid for unsubscriptions */ private function loadUnsubscriptions() { // get results $results = BackendMailmotorModel::getRecentUnsubscriptions(self::PAGING_LIMIT); // there are some results if (!empty($results)) { $dataGrid = new BackendDataGridArray($results); $dataGrid->setPaging(false); $dataGrid->setColumnFunction(array(new BackendDataGridFunctions(), 'getTimeAgo'), array('[unsubscribed_on]'), 'unsubscribed_on', true); // check if this action is allowed if (BackendAuthentication::isAllowedAction('EditAddress')) { $dataGrid->setColumnURL('email', BackendModel::createURLForAction('EditAddress', 'Mailmotor') . '&email=[email]'); } // parse the datagrid $this->tpl->assign('dgMailmotorUnsubscriptions', $dataGrid->getContent()); } }