/** * Initializes the database with the init data for the contact module. */ public function init() { // create status entries for the contact module $contactStatusModel = new Contact_Model_Status(); if ($contactStatusModel->getResource()->countRows() == 0) { foreach ($this->_init->options['init']['contact']['status'] as $status) { $a = array('status' => $status); $r = $contactStatusModel->create($a); $this->_check($r, $a); } } // create category entries for the contact module $contactCategoriesModel = new Contact_Model_Categories(); if ($contactCategoriesModel->getResource()->countRows() == 0) { foreach ($this->_init->options['init']['contact']['categories'] as $category) { $a = array('category' => $category); $r = $contactCategoriesModel->create($a); $this->_check($r, $a); } } }