/** Query for data and display * @param int $id * @return string $html */ public function ChangesCoins($id) { if (in_array($this->_getRole(), $this->_allowed)) { $audit = new CoinsAudit(); $auditdata = $audit->getChanges($id); if ($auditdata) { $html = '<h5>Coin data audit</h5>'; $html .= '<ul id="related">'; foreach ($auditdata as $a) { $html .= $this->buildHtml($a); } $html .= '</ul>'; return $html; } else { return false; } } }
/** Get a coin overlay from the audit table */ public function coinauditAction() { $audit = new CoinsAudit(); $this->view->audit = $audit->getChange($this->_getParam('id')); }
/** Get the data from the model * @access public * @return string */ public function getData() { $html = ''; if (in_array($this->_getRole(), $this->_allowed)) { $audit = new CoinsAudit(); $auditdata = $audit->getChanges($this->getId()); if ($auditdata) { $html .= '<h5>Coin data audit</h5>'; $html .= '<ul id="related">'; $html .= $this->parseArray($auditdata); $html .= '</ul>'; } else { $html .= self::NOTHING; } } return $html; }