public function getOptions($form) { $options = array(); //Get clients $clientsDb = new Admin_Model_DbTable_Client(); $clientsObject = $clientsDb->fetchAll(); $clients = array(); foreach ($clientsObject as $client) { $clients[$client->id] = $client->company; } $options['clients'] = $clients; //Get languages $languagesDb = new Admin_Model_DbTable_Language(); $languagesObject = $languagesDb->fetchAll(); $languages = array(); foreach ($languagesObject as $language) { $languages[$language->code] = $language->name; } $options['languages'] = $languages; //Set form options if (isset($form->clientid)) { $form->clientid->addMultiOptions($clients); } if (isset($form->language)) { $form->language->addMultiOptions($languages); } return $options; }
public function keepaliveAction() { $id = $this->_getParam('id', 0); $this->_helper->viewRenderer->setNoRender(); $this->_helper->getHelper('layout')->disableLayout(); $clientDb = new Admin_Model_DbTable_Client(); $clientDb->lock($id, $this->_user['id'], $this->_date); }