Ajax/semantic/widgets/base/FieldAsTrait.php
public function fieldsAs(array $types){
		$i=0;
		if(JArray::isAssociative($types)){
			foreach ($types as $type=>$attributes){
				if(\is_int($type))
					$this->fieldAs($i++,$attributes,[]);
				else{
					$type=preg_replace('/\d/', '', $type );
					$this->fieldAs($i++,$type,$attributes);
				}
			}
		}else{
			foreach ($types as $type){
				$this->fieldAs($i++,$type);
			}
		}
	}
public function fieldsAs(array $types){
		$i=0;
		if(JArray::isAssociative($types)){
			foreach ($types as $type=>$attributes){
				if(\is_int($type))
					$this->fieldAs($i++,$attributes,[]);
				else{
					$type=preg_replace('/\d/', '', $type );
					$this->fieldAs($i++,$type,$attributes);
				}
			}
		}else{
			foreach ($types as $type){
				$this->fieldAs($i++,$type);
			}
		}
	}
public function fieldsAs ( array $ types ) { $ i = 0 ; if ( JArray :: isAssociative ( $ types ) ) { foreach ( $ types as $ type => $ attributes ) { if ( \ is_int ( $ type ) ) $ this -> fieldAs ( $ i ++ , $ attributes , [ ] ) ; else { $ type = preg_replace ( '/\d/' , '' , $ type ) ; $ this -> fieldAs ( $ i ++ , $ type , $ attributes ) ; } } } else { foreach ( $ types as $ type ) { $ this -> fieldAs ( $ i ++ , $ type ) ; } } }
Change fields type
@param array $types an array or associative array $type=>$attributes
Change fields type