You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a content type application which have few fields and one of the field is term reference(field_waso ).
I made a resource in my custom restful module which have all the public fields.
Below is my code:
'field_waso',
);
$public_fields['virtualhost'] = array(
'property' => 'field_virtualhosts',
'resource' => array(
'name' => 'virtualhost',
'majorVersion' => '1',
'minorVersion' => '0'
),
);
$public_fields['field_global_local'] = array(
'property' => 'field_global_local',
);
$public_fields['field_availability'] = array(
'property' => 'field_availability',
);
$public_fields['field_criticality'] = array(
'property' => 'field_criticality',
);
$public_fields['field_integrity'] = array(
'property' => 'field_integrity',
);
$public_fields['field_traceability'] = array(
'property' => 'field_traceability',
);
return $public_fields;
}
}
when I run my code to this site: mysite/api/custom
I get the id of my term reference field not its name.
can anybody help me how to get the name of the term which is in vocabulary of waso filed?
![field_waso](https://user-images.githubusercontent.com/66878672/84573288-3eaa6500-adbd-11ea-9309-a7af41dab88c.PNG)
![Name in waso](https://user-images.githubusercontent.com/66878672/84573355-99dc5780-adbd-11ea-956a-553c173c491b.PNG)
The text was updated successfully, but these errors were encountered:
Hello
I have a content type application which have few fields and one of the field is term reference(field_waso ).
'field_waso', ); $public_fields['virtualhost'] = array( 'property' => 'field_virtualhosts', 'resource' => array( 'name' => 'virtualhost', 'majorVersion' => '1', 'minorVersion' => '0' ), ); $public_fields['field_global_local'] = array( 'property' => 'field_global_local', ); $public_fields['field_availability'] = array( 'property' => 'field_availability', ); $public_fields['field_criticality'] = array( 'property' => 'field_criticality', ); $public_fields['field_integrity'] = array( 'property' => 'field_integrity', ); $public_fields['field_traceability'] = array( 'property' => 'field_traceability', ); return $public_fields; } } when I run my code to this site: mysite/api/custom I get the id of my term reference field not its name. can anybody help me how to get the name of the term which is in vocabulary of waso filed? ![field_waso](https://user-images.githubusercontent.com/66878672/84573288-3eaa6500-adbd-11ea-9309-a7af41dab88c.PNG) ![Name in waso](https://user-images.githubusercontent.com/66878672/84573355-99dc5780-adbd-11ea-956a-553c173c491b.PNG)I made a resource in my custom restful module which have all the public fields.
Below is my code:
The text was updated successfully, but these errors were encountered: