public function getBinList($_whlocation_id = '') { // used by ajax to get a list of bins for a location if (isset($this->_data['ajax'])) { if (!empty($this->_data['whlocation_id'])) { $_whlocation_id = $this->_data['whlocation_id']; } } $location = new WHLocation(); $location->load($_whlocation_id); $bins = $location->getBinList(); if (isset($this->_data['ajax'])) { $this->view->set('options', $bins); $this->setTemplateName('select_options'); } else { return $bins; } }