/** * A Flexy helper method to return the value of a field for display. * * Overrides the parent Flexy helper method so that it can deal with * displaying warnings for average calculations, etc. * * @param array $aArray An array of items. * @param string $k The index name of the item to display. * @return mixed The item to display. */ function showValue($aArray, $k) { if ($k == 'average') { if ($aArray[$k] === true || is_numeric($aArray[$k]) && $aArray[$k] > 0) { self::$averagedColumnDisplayed = true; return '<img src="' . OX::assetPath() . '/images/warning.gif" width="16 height="16" alt="" title="" />'; } else { if (preg_match('/light$/', $aArray[$k])) { return parent::showValue($aArray, $k); } else { if (preg_match('/dark$/', $aArray[$k])) { return parent::showValue($aArray, $k); } else { return '-'; } } } } else { return parent::showValue($aArray, $k); } }