Toggle menu
862
3.8K
30.2K
279.1K
Catglobe Wiki
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

FolderResourceTemplate: Difference between revisions

From Catglobe Wiki
Nguyenduyan (talk | contribs)
No edit summary
Nguyenduyan (talk | contribs)
No edit summary
Line 7: Line 7:
|Description=Create a new Folder resource template}}
|Description=Create a new Folder resource template}}
|Methods=
|Methods=
{{CGscriptMethods_Template|ReturnType=Empty|Name=AddProperty|Parameters=
{{CGscriptParameters_Template|Type=ResourceTemplateProperty|Name=property|Description=Property to add}}
|Description=Add a new property}}
{{CGscriptMethods_Template|ReturnType=Empty|Name=DefaultLanguage|Parameters=
{{CGscriptMethods_Template|ReturnType=Empty|Name=DefaultLanguage|Parameters=
{{CGscriptParameters_Template|Type=string|Name=isocode|Description=Iso code to set as default}}
{{CGscriptParameters_Template|Type=string|Name=isocode|Description=Iso code to set as default}}
|Description=Which Localized Name is the default}}
|Description=Which Localized Name is the default}}
{{CGscriptMethods_Template|ReturnType=Empty|Name=RemoveProperty|Parameters=
{{CGscriptParameters_Template|Type=ResourceTemplateProperty|Name=property|Description=Property to remove}}
|Description=Remove existing property}}
{{CGscriptMethods_Template|ReturnType=Empty|Name=Save|Description=Save the ResourceTemplate resource}}
{{CGscriptMethods_Template|ReturnType=Empty|Name=Save|Description=Save the ResourceTemplate resource}}
{{CGscriptMethods_Template|ReturnType=Empty|Name=SaveProperties|Description=Save the properties of the ResourceTemplate resource. Ignores changes to all constant options in use}}
{{CGscriptMethods_Template|ReturnType=Empty|Name=SaveProperties|Description=Save the properties of the ResourceTemplate resource. Ignores changes to all constant options in use}}

Revision as of 10:11, 15 November 2016

FolderResourceTemplate



A Folder resource template.

Constructors

  • (string name "Resource name") - Create a new Folder resource template

Methods

  • Empty DefaultLanguage(string isocode "Iso code to set as default") - Which Localized Name is the default
  • 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