Helper::extractValues PHP Method

extractValues() public static method

Extract values from a list of objects or arrays using {@link CHtml value}.
public static extractValues ( array $objects, $attribute, mixed $default = null ) : array
$objects array
$default mixed
return array
    public static function extractValues(array $objects, $attribute, $default = null)
    {
        $values = array();
        foreach ($objects as $object) {
            $values[] = CHtml::value($object, $attribute, $default);
        }
        return $values;
    }

Usage Example

Exemplo n.º 1
0
 /**
  * Systemic diagnoses shortcode
  *
  * @return string
  */
 public function getSyd()
 {
     return strtolower(Helper::formatList(Helper::extractValues($this->getSystemicDiagnoses(), 'disorder.term')));
 }
All Usage Examples Of Helper::extractValues