Group Class Reference
Inherits from | NSObject |
---|---|
Declared in | Group.h |
Properties
– objectForKey:
Gets the data for given property.
- (BUILT_NULLABLE id)objectForKey:(NSString *)key
Parameters
key |
The object’s property |
---|
Return Value
The value for the key provided
Discussion
//Assuming 'detailGroup' is a Group instance
//Obj-C
id object = [detailGroup objectForKey:@"key"];
//Swift
var object = detailGroup.objectForKey("key")
Declared In
Group.h
Asset Method
– assetForKey:
- (Asset *)assetForKey:(NSString *)key
Parameters
key |
Key containing the reference value of Asset |
---|
Return Value
Instance of Asset.
Discussion
// 'projectImage' is a key in group object for asset
//Obj-C
Asset *asset = [groupObject assetForKey:@"projectImage"];
//Swift
var asset:Asset = groupObject.assetForKey("projectImage")
Declared In
Group.h
– assetsForKey:
Get the array containing instance of Assets mentioned in key specified.
- (NSArray *)assetsForKey:(NSString *)key
Parameters
key |
Key containing the colection reference value of Assets. |
---|
Return Value
Array containing instance of Assets.
Discussion
// 'projectImages' is a key in group object for asset
//Obj-C
NSArray *assetArray = [groupObject assetsForKey:@"projectImages"];
//Swift
var assetArray = groupObject.assetsForKey("projectImages")
Declared In
Group.h
Get Single or Multiple Group/s
– groupForKey:
Get the info of the specified key of sub group object and returns instance of Group.
- (nullable Group *)groupForKey:(NSString *)key
Parameters
key |
Key containing the value of Group |
---|
Return Value
Instance of Group
Discussion
// 'details' is a key in employee group for its sub group
//Obj-C
Group *detailsGroup = [empGroup groupForKey:@"details"];
//Swift
var detailsGroup:Group = empGroup.groupForKey("details")
Declared In
Group.h
– groupsForKey:
Get the info of the specified key of group with multiple sub group and returns array of Group.
- (NSArray *)groupsForKey:(NSString *)key
Parameters
key |
Key containing the value of Group array |
---|
Return Value
NSArray of Groups
Discussion
// 'addresses' is a key in employee group for multiple group
//Obj-C
NSArray *groups = [empGroup groupsForKey:@"addresses"];
//Swift
var groups:NSArray = empGroup.groupsForKey("addresses")
Declared In
Group.h
HTML String from Markdown
– HTMLStringForMarkdownKey:
Converts Markdown to String of HTML String for specified key
- (BUILT_NULLABLE NSString *)HTMLStringForMarkdownKey:(NSString *)key
Parameters
key |
is Markdown string parameter |
---|
Return Value
Markdown to HTML String
Discussion
//Assuming 'groupObj' is a Group instance
//Obj-C
NSString *markdownString = [groupObj HTMLStringForMarkdownKey:@"markdownString"];
//Swift
var markdownString:NSString = groupObj.HTMLStringForMarkdownKey("markdownString")
Declared In
Group.h
– HTMLArrayForMarkdownKey:
Converts Markdown to Array of HTML String for specified key
- (BUILT_NULLABLE NSArray *)HTMLArrayForMarkdownKey:(NSString *)key
Parameters
key |
is Multiple Markdown Parameter |
---|
Return Value
HTML Array from Markdown
Discussion
//Assuming 'groupObj' is a Group instance
//Obj-C
NSArray *markdownArray = [groupObj HTMLArrayForMarkdownKey:@"multiple_markdown"];
//Swift
var markdownArray = groupObj.HTMLArrayForMarkdownKey("multiple_markdown")
Declared In
Group.h
– entriesForKey:withContentType:
Returns an array of Entries for the specified reference key
- (NSArray *)entriesForKey:(NSString *)referenceKey withContentType:(NSString *)contentTypeName
Parameters
referenceKey |
the reference field key |
---|---|
contentTypeName |
set the contentTypeName to which the object(s) belongs |
Return Value
An array of Entries for the specified key
Discussion
Use this method to retrieve entries when using includeRefFieldWithKey: method of Query. The reference field key may have an array of objects or a single object. This method will return the Entries for the included reference field.
//Assuming 'groupObj' is a Group instance
//Obj-C
[grpObj entriesForKey:@"detail" withContentType:"description"];
//Swift
grpObj.entriesForKey("detail" withContentType:"description")
Declared In
Group.h