public static function extractValues(array $objects, $attribute, $default = null) { $values = array(); foreach ($objects as $object) { $values[] = CHtml::value($object, $attribute, $default); } return $values; }
/** * Systemic diagnoses shortcode * * @return string */ public function getSyd() { return strtolower(Helper::formatList(Helper::extractValues($this->getSystemicDiagnoses(), 'disorder.term'))); }