Difference between revisions of "FolderResourceTemplate"
Nguyenduyan (talk | contribs) |
Nguyenduyan (talk | contribs) |
||
Line 45: | Line 45: | ||
folderRT.Save(); | folderRT.Save(); | ||
+ | </source> | ||
+ | |||
+ | <br/><source lang="javascript"> | ||
+ | number folderResourceTemplateRId = 15547989; | ||
+ | ResourceTemplateHelper rth = new ResourceTemplateHelper (); | ||
+ | FolderResourceTemplate folderRT = rth.GetTemplate(folderResourceTemplateRId); | ||
+ | |||
+ | print(folderRT.ResourceName);//folderRT name | ||
+ | print(folderRT.ResourceId);//15547989 | ||
</source> | </source> |
Revision as of 11:05, 15 November 2016
FolderResourceTemplate
A Folder resource template.
Constructors
- (string name "Resource name") - Create a new Folder resource template
Methods
- Empty AddProperty(ResourceTemplateProperty property "Property to add") - Add a new property
- Empty DefaultLanguage(string isocode "Iso code to set as default") - Which Localized Name is the default
- Empty RemoveProperty(ResourceTemplateProperty property "Property to remove") - Remove existing property
- Empty Save() - Save the ResourceTemplate resource
- Empty SaveProperties() - Save the properties of the ResourceTemplate resource. Ignores changes to all constant options in use
- string ToString() - The string representation of the object.
Properties
- Dictionary LocalizedNames { get; set; } - Localized Name of the ResourceTemplate resource
- string ObjectTypeName { get; } - The name of the type of object.
- array Properties { get; } - Get the list of current properties. Use AddProperty/RemoveProperty to edit order
- int ResourceId { get; } - The Id of the ResourceTemplate
- string ResourceName { get; } - Name of the ResourceTemplate resource
- bool ResourceTimeregEnabled { get; set; } - Get/set ResourceTimeregEnabled
- TypeInformation TypeInformation { get; } - Get information about this class.
Examples
FolderResourceTemplate folderRT = new FolderResourceTemplate("folderRT name");
folderRT.LocalizedNames={"en-US":"folderRT name US"};
folderRT.Save();
number folderResourceTemplateRId = 15547989;
ResourceTemplateHelper rth = new ResourceTemplateHelper ();
FolderResourceTemplate folderRT = rth.GetTemplate(folderResourceTemplateRId);
folderRT.ResourceTimeregEnabled=false;
folderRT.Save();
number folderResourceTemplateRId = 15547989;
ResourceTemplateHelper rth = new ResourceTemplateHelper ();
FolderResourceTemplate folderRT = rth.GetTemplate(folderResourceTemplateRId);
print(folderRT.ResourceName);//folderRT name
print(folderRT.ResourceId);//15547989