src/models/Measure.php
public static function getMeasures($type)
    {
        /** @var ActiveQuery $query */
        $query = static::find()->select(['name', 'id'])->indexBy('id');
        if (empty($type) === false) {
            $query->where(['type' => $type]);
        }
        return $query->column();
    }
public static function getMeasures($type)
    {
        /** @var ActiveQuery $query */
        $query = static::find()->select(['name', 'id'])->indexBy('id');
        if (empty($type) === false) {
            $query->where(['type' => $type]);
        }
        return $query->column();
    }
public static function getMeasures ( $ type ) { /** @var ActiveQuery $query */ $ query = static :: find ( ) -> select ( [ 'name' , 'id' ] ) -> indexBy ( 'id' ) ; if ( empty ( $ type ) === false ) { $ query -> where ( [ 'type' => $ type ] ) ; } return $ query -> column ( ) ; }
Get measures by type name.
@param string $type
@return array of measures in the next format `measure_id => 'Measure name'`
Get measures by type name .