I would like to get all the fields (with their handles and values) for a given global set.
For example : My set is called 'labels'. I know I can get the set by using :
$criteria = craft()->elements->getCriteria(ElementType::GlobalSet); $criteria->handle = 'labels'; $labels = $criteria->first();
Or with :
$labels = craft()->globals->getSetByHandle('labels');
Then I can get a specific data with
But how can I get all the data/fields in the set ? I would like to have an array or an object with all my labels (in my controller I return the value using returnJson).
Thanks for your help !