Difference between revisions of "NavigationAccessHelper class"

From Catglobe Wiki
Jump to: navigation, search
(Created page with "{{CGscriptClass_Template |Name=NavigationAccessHelper |Description=Class to manipulate navigation access |Constructors= {{CGscriptConstructors_Template|Description=Instanciate...")
 
Line 15: Line 15:
 
{{CGscriptProperties_Template|ReturnType=TypeInformation|Name=TypeInformation|HasGetter=1|Description=Get information about this class.}}
 
{{CGscriptProperties_Template|ReturnType=TypeInformation|Name=TypeInformation|HasGetter=1|Description=Get information about this class.}}
 
}}
 
}}
 +
 +
=== <span style="color:#DF8621">'''Examples'''</span> ===
 +
 +
<source lang="javascript">
 +
NavigationAccessHelper nav = new NavigationAccessHelper();
 +
print(nav.AllAvailableNavigationAccess());
 +
print(nav.AllNavigationAccessWithAccess());
 +
print(nav.HasNavigationAccess("Questionnaire_Search"));
 +
</source>

Revision as of 06:14, 13 January 2017

NavigationAccessHelper



Class to manipulate navigation access

Constructors

  • () - Instanciate new helper

Methods

  • Array of string AllAvailableNavigationAccess() - Get names of all navigation access in the system
  • Array of string AllNavigationAccessWithAccess() - Get names of all navigation access the current user has access to in the system
  • bool HasNavigationAccess(string navigationAccessName "Name of the nav access to check") - Check if the current user has access to a specific navigation access
  • string ToString() - The string representation of the object.

Properties

  • string ObjectTypeName { get; } - The name of the type of object.
  • TypeInformation TypeInformation { get; } - Get information about this class.


Examples

NavigationAccessHelper nav = new NavigationAccessHelper();
print(nav.AllAvailableNavigationAccess());
print(nav.AllNavigationAccessWithAccess());
print(nav.HasNavigationAccess("Questionnaire_Search"));