public static function enumerationToJson($name) { $enumeration = new self(); $enumeration->populateByEnumerationName($name); $enumerationsClosure = new EnumerationsClosure(); $enumerationIterator = $enumerationsClosure->getAllDescendants($enumeration->enumerationId, 1); return $enumerationIterator->toJsonArray('enumerationId', array('name')); }