Example #1
0
 /**
  * Load the datagrid for subscriptions
  */
 private function loadSubscriptions()
 {
     // get results
     $results = BackendMailmotorModel::getRecentSubscriptions(self::PAGING_LIMIT);
     // there are some results
     if (!empty($results)) {
         // get the datagrid
         $dataGrid = new BackendDataGridArray($results);
         // no pagination
         $dataGrid->setPaging(false);
         // set column functions
         $dataGrid->setColumnFunction(array(new BackendDataGridFunctions(), 'getTimeAgo'), array('[subscribed_on]'), 'subscribed_on', true);
         // check if this action is allowed
         if (BackendAuthentication::isAllowedAction('EditAddress', 'Mailmotor')) {
             // set edit link
             $dataGrid->setColumnURL('email', BackendModel::createURLForAction('EditAddress', 'Mailmotor') . '&email=[email]');
         }
         // parse the datagrid
         $this->tpl->assign('dgMailmotorSubscriptions', $dataGrid->getContent());
     }
 }