This is the API documentation for concrete5 version 5.6 and earlier. View Current API Documentation
 1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 
<?php
defined('C5_EXECUTE') or die("Access Denied.");
class Concrete5_Controller_Dashboard_System_Mail_Importers extends DashboardBaseController {
    protected $sendUndefinedTasksToView = false;
    public function on_start() {    
        $this->set('importers',MailImporter::getList() );
        parent::on_start();
    }

    public function edit_importer($miID = false) {
        $this->set('form', Loader::helper('form'));
        $this->set('mi', MailImporter::getByID($miID));
    }
    
    public function save_importer() {
        if (!Loader::helper('validation/token')->validate('save_importer')) {
            $this->error->add(t('Invalid Token.'));
            return;
        }

        $miID = $this->post('miID');
        $mi = MailImporter::getByID($miID);
        if (is_object($mi)) {
            $mi->update($this->post());
            $this->redirect('/dashboard/system/mail/importers', 'importer_updated');
        }
    }
    
    public function importer_updated() {
        $this->set('message', t('Importer saved.'));
    }
        
}

?>