Squiz Matrix
4.12.2
|
Static Public Member Functions | |
static | paintJSFunctions (JS_Api $js_api_asset) |
Definition at line 30 of file js_api_standard_function_list.inc.
|
static |
+–——————————————————————+ | This MySource Matrix CMS file is Copyright (c) Squiz Pty Ltd | | ABN 77 084 670 600 | +–——————————————————————+ | IMPORTANT: Your use of this Software is subject to the terms of | | the Licence provided in the file licence.txt. If you cannot find | | this file please contact Squiz (www.squiz.com.au) so we may provide| | you a copy. | +–——————————————————————+
This will create an ajax request
Checks to see if a variable is set
string | obj The variable we check |
Turns JSON into a javascript object
string | json The JSON string to convert |
Our default callback
string | ajaxRequest The ajax function |
string | dataCallback Callback that happens after success |
This will return our api key
string | api_key The api key of our Javascript API Asset |
Make our ajax request
string | url The url to send to the server |
boolean | receive Should we even use a callback |
function | dataCallback Custom callback function |
Recursive helper function to write out all properties of an object
object | obj The JSON object |
object | parent Parent JSON object |
This will return general information about the asset
string | asset_id Id of the asset we are getting info for |
boolean | get_attributes if we are getting non standard attribute values of the assets(FALSE by default) |
function | dataCallback Custom callback function |
This will get the Child count for the passed in asset
string | asset_id Id of the asset to get children of |
number | level Number of levels to return, default all |
function | dataCallback Custom callback function |
This will return attributes of the specific asset
string | asset_id Id of the asset we are getting info for |
function | dataCallback Custom callback function |
This will set an attribute value
string | asset_id Id of the asset we are getting info for |
string | attr_name Name of the attribute to change |
string | attr_val Value to change the attribute to |
function | dataCallback Custom callback function |
This will set an multiple attributes value for an Asset
string | asset_id Id of the asset we are getting info for |
array | field_info Attribute name and their respective values to be changed to |
function | dataCallback Custom callback function |
This will return a metadata value for the passed metadata name
string | asset_id Id of the asset we are getting info for |
function | dataCallback Custom callback function |
This will set a metadata value
string | asset_id Id of the asset we are getting info for |
function | dataCallback Custom callback function |
Set metadata values of multiple fields for an asset
string | asset_id Id of asset to set metadata for |
array | field_info Field Ids and their values |
function | dataCallback Custom callback function |
This will send an asset to the trash
array | | string asset_ids Id of the asset(s) to delete |
function | dataCallback Custom callback function |
This will return child asset ids of the passed asset
string | asset_id Id of the asset to get children of |
number | levels Number of levels to return |
array | type_codes asset type_code that we want back |
array | link_type type of links we are looking for Valid Values - SQ_LINK_TYPE_1, SQ_LINK_TYPE_2, SQ_LINK_TYPE_3, SQ_LINK_NOTICE |
array | link_values link values allowed on the asset returned |
boolean | get_attributes if we are getting non standard attribute values of the assets(FALSE by default) |
function | dataCallback Custom callback function |
NOTE : type_code, link_type and link_values are empty by default. So matrix will return everything also these options work for direct links only i.e. levels = 1
This return parents of the passed id
string | asset_id Id of the asset to get parents of |
number | levels Number of levels to return |
array | type_codes asset type_code that we want back |
array | link_type type of links we are looking for Valid Values - SQ_LINK_TYPE_1, SQ_LINK_TYPE_2, SQ_LINK_TYPE_3, SQ_LINK_NOTICE |
array | link_values link values allowed on the asset returned |
boolean | get_attributes if we are getting non standard attribute values of the assets(FALSE by default) |
function | dataCallback Custom callback function |
NOTE : type_code, link_type and link_values are empty by default. So matrix will return everything also these options work for direct links only i.e. levels = 1
This returns permissions for an asset
string | asset_id Id of the asset to get permissions for |
string | level 1=READ 2=WRITE 3=ADMIN, default to READ |
function | dataCallback Custom callback function |
Creates an asset
integer | parent_id Parentid of the new parent |
string | type_code Type code of new asset |
string | asset_name Name for new asset |
integer | link_type Type of link to create |
string | link_value Value of the link |
integer | sort_order Order in the tree |
integer | is_dependant Dependant to parent |
integer | is_exclusive Exclusive to parent |
integer | extra_attributes Allows additional attributes |
string | attributes String of additional query string containing key/pair values |
This function will create file type asset of the type_code provided
string | parentID asset ID of parent where the new asset will be linked to |
string | type_code type_code of the new asset(default to 'file') |
string | friendly_name friendly name of the new asset to be created |
string | link_type type of link to create to the parent for this new asset(SQ_LINK_TYPE_1 link by default) Valid Values - SQ_LINK_TYPE_1, SQ_LINK_TYPE_2, SQ_LINK_TYPE_3, SQ_LINK_NOTICE |
string | link_value value of link to create to the parent for this new asset('' by default) |
function | dataCallback Custom callback function |
Returns asset type codes installed on the system
function | dataCallback Custom callback function |
Gets information for lock type passed
string | asset_id Id of the asset to get locks for |
string | screen_name The screen to get locks for |
function | dataCallback Custom callback function |
Acquires locks on the given asset. if the locks were already acquired by current user then they are updated
string | asset_id Id of the asset to get locks for |
string | screen_name The screen to get locks for |
boolean | dependants_only whether dependants only or all children, defaults to true |
boolean | force_acquire whether to attempt to forceably acquire the lock or not, defaults to false |
function | dataCallback Custom callback function |
Releases a lock
string | asset_id Id of the asset to release locks for |
string | screen_name The screen to release locks for |
function | dataCallback Custom callback function |
Creates a link between two assets with passed information
integer | parent_id Major asset id we are linking from |
integer | child_id Minor asset id we are linking to |
integer | link_type Type of link to create |
string | link_value Value of the link |
integer | sort_order Order in the tree |
integer | is_dependant Dependant to parent |
integer | is_exclusive Exclusive to parent |
Removes a link between a parent and child
string | parent_id Id of the parent |
string | child_id Id of the child |
string | link_type type of link we are looking for (SQ_LINK_TYPE_1 link by default) Valid Values - SQ_LINK_TYPE_1, SQ_LINK_TYPE_2, SQ_LINK_TYPE_3, SQ_LINK_NOTICE |
string | link_value value of link we are looking for ('' by default) |
function | dataCallback Custom callback function |
Removes multiple links between parent and child pairs
json | object link_info array of link_info example : var link_info = { "links":[ { "parent": parent, "child": child, "link_type": link_type, "link_value": link_value, }, { "parent": parent_2, "child": child_2, "link_type": link_type_2, "link_value": link_value, }, { "parent": parent_3, "child": child_3, "link_type": link_type_3, "link_value": link_value, }, ] }; |
values in JSON object string parent Id of the parent string child Id of the child string link_type type of link we are looking for(SQ_LINK_TYPE_1 link by default) Valid Values - SQ_LINK_TYPE_1, SQ_LINK_TYPE_2, SQ_LINK_TYPE_3, SQ_LINK_NOTICE string link_value value of link we are looking for ('' by default)
function | dataCallback Custom callback function |
Moves a link from one parent to another
string | old_parent_id Id of the old parent |
string | child_id Id of the child |
string | old_link_type Type of link we are searching for between given assets (SQ_LINK_TYPE_1 link by default) Valid Values - SQ_LINK_TYPE_1, SQ_LINK_TYPE_2, SQ_LINK_TYPE_3 |
string | old_link_value Value of link we are searching for between given assets ('' by default) |
string | new_parent_id Id of the new parent |
string | new_link_type Type of link to use (SQ_LINK_TYPE_1 link by default) Valid Values - SQ_LINK_TYPE_1, SQ_LINK_TYPE_2, SQ_LINK_TYPE_3 |
string | new_link_value Value of link to use ('' by default) |
string | new_position The new position |
function | dataCallback Custom callback function |
Updates a link with provided information
string | parent_id id of the parent |
string | child_id id of the child |
string | existing_link_type existing link type betweent the assets (SQ_LINK_TYPE_1 link by default) Valid Values - SQ_LINK_TYPE_1, SQ_LINK_TYPE_2, SQ_LINK_TYPE_3, SQ_LINK_NOTICE |
string | existing_link_value existing link value betweent the assets ('' by default) |
string | link_type link type to be updated to (SQ_LINK_TYPE_1 link by default) Valid Values - SQ_LINK_TYPE_1, SQ_LINK_TYPE_2, SQ_LINK_TYPE_3, SQ_LINK_NOTICE |
string | link_value link value to be updated to ('' by default) |
string | new_position the new position |
string | locked the asset link lock status(locked by default) |
function | dataCallback custom callback function |
Updates multiple links
json | object link_info Array of all the link information example : var link_info = { "links":[ { "parent": parent, "child": child, "existing_link_type": ext_link_type, "existing_link_value": ext_link_value, "link_type": link_type, "link_value": link_value, "sort_order": sort_order, "link_lock": link_lock, }, { "parent": parent_2, "child": child_2, "existing_link_type": ext_link_type_2, "existing_link_value": ext_link_value_2, "link_type": link_type_2, "link_value": link_value_2, "sort_order": sort_order_2, "link_lock": link_lock_2, }, { "parent": parent_3, "child": child_3, "existing_link_type": ext_link_type_3, "existing_link_value": ext_link_value_3, "link_type": link_type_3, "link_value": link_value_3, "sort_order": sort_order_3, "link_lock": link_lock_3, }, ] }; |
values in JSON object string parent Id of the parent string child Id of the child string existing_link_type type of link we are looking for(SQ_LINK_TYPE_1 link by default) Valid Values - SQ_LINK_TYPE_1, SQ_LINK_TYPE_2, SQ_LINK_TYPE_3, SQ_LINK_NOTICE string existing_link_value value of link we are looking for ('' by default) string link_type type of link we changing to (SQ_LINK_TYPE_1 link by default) Valid Values - SQ_LINK_TYPE_1, SQ_LINK_TYPE_2, SQ_LINK_TYPE_3, SQ_LINK_NOTICE string link_value value of link we are changing it to ('' by default) string sort_order sort order we want to update the link to boolean link_lock link lock value we want to set it to(default to TRUE)
function | dataCallback Custom callback function |
Returns the link id between a parent and child
string | parent_id Id of the parent |
string | child_id Id of the child |
string | link_type type of link we are looking for(SQ_LINK_TYPE_1 link by default) Valid Values - SQ_LINK_TYPE_1, SQ_LINK_TYPE_2, SQ_LINK_TYPE_3, SQ_LINK_NOTICE |
string | link_value value of link we are looking for ('' by default) |
boolean | all_info if we want all the link information or just linkid |
function | dataCallback Custom callback function |
This will return tree information for children
string | asset_id Id of the asset to get children of |
number | levels Number of levels to return |
function | dataCallback Custom callback function |
This will get replacements for the passed in keywords
string | asset_id Id of the asset to get keyword replacements for |
array | keywords Array of keywords to get replacements for |
function | dataCallback Custom callback function |
This will set Asset to the status that is passed in
string | asset_id id of the asset to set status to |
int | status status tha asset is to be set to |
boolean | cascade if to cascade the status to non-dependant children(false by default) |
string | workflow_stream workflow stream to be passed in |
function | dataCallback custom callback function |
This will get webpath(s) of the assetid supplied
string | asset_id Id of the asset to get webpaths for |
function | dataCallback Custom callback function |
This will set webpath(s) of the assetid supplied
string | asset_id Id of the asset to set webpaths for |
array | paths new web paths to be assigned to asset |
boolean | auto_remap if we auto remaping(default to TRUE) |
function | dataCallback Custom callback function |
This function will tell us if we have a runnig workflow on the passed assetid
string | asset_id Id of the asset to get workflow schemas on |
boolean | granted what is the status of workflow we are trying to get (default to NULL) TRUE => granted, FALSE => denied, NULLL => get all |
boolean | running if we only are getting wokflows that are running (default to FALSE) |
function | dataCallback Custom callback function |
This function will let user edit content of Editable File type assets File type that can be edited - css_file, xml_file, css_file, text_file, xsl_file, js_file User needs to acquire locks before being able to edit the file
string | assetID Id of the asset to update content for |
string | content new content of the asset |
function | dataCallback Custom callback function |
This function will let user import assets into Matrix from a structured XML file For example for xml file look under System Tools > Import Assets from XML Tool > example.xml
string | assetID Asset under which the assets are to be imported under |
string | filePath path to file on the file system |
function | dataCallback Custom callback function |
Returns an array of roles and the users/groups which can perform it
int | assetid the assetid of the asset the role is applied to |
int | roleid the assetid of the the role that is applied |
int | userid the assetid of the user performing the role |
boolean | include_assetid whether to include the assetid in the returned array |
boolean | include_globals whether to query the role view which includes expanded global roles as individual users |
boolean | expand_groups when TRUE, any groups defined within a role will be replaced with the userids in that group. If FALSE, return the groupids |
boolean | inc_dependants If false it will filter out the dependant assets |
boolean | include_parents When userid is specified. This will include the roles applied directly to the user and indirectly to user parent groups. |
array | type_codes When include_assetid is TRUE. This is a type code filter for returned assetids. |
boolean | strict_type_code Use strict type code for type code filter |
function | dataCallback Custom callback function |
Performs HTMLTidy on the passed content and returns cleaned up code
string | content the string content that needs to be cleaned up |
function | dataCallback Custom callback function |
Gets lineage based on the url passed for the asset
string | asset_url the asset url we are getting lineage from |
boolean | significant_link_only if get to get back significant (type_1 and type_2) links only |
function | dataCallback Custom callback function |
Returns an array of assets info in the order that they propagate out from the given URL.
string | asset_url the asset url we are getting lineage from |
function | dataCallback Custom callback function |
Given an array of asset ids in the order that they propagate out from site, it returns an array of URL(s) that matches the lineage.
array | lineage asset id array to represent lineage from top to bottom |
string | root_url optional parameter to further filter results against multiple root urls |
string | protocol optional parameter to further filter results for protocol (http, https) |
function | dataCallback Custom callback function |
batches multiple JS API calls and executs them in one HTTP Request
json | function json of all the function and its respective arguments to be passed in |
function | dataCallback Custom callback function |
clones the passed asset under a new parent
assetid | string id of asset we want to clone |
new_parent | string assetid of the parent to clone under |
clone_num | int number of clones to create under new parent (default is 1) |
new_position | int position to place the newly cloned asset at (default at the bottom) |
link_type | string type of links we want to create for cloned asset(default is SQ_LINK_TYPE_1) Valid Values - SQ_LINK_TYPE_1, SQ_LINK_TYPE_2, SQ_LINK_TYPE_3 |
link_value | string the value of new link we want (default '') |
function | dataCallback Custom callback function |
gets the content (with or without paint layout) and check for the difference
assetid_1 | string assetid of first asset |
assetid_2 | string assetid of second asset |
paint_layout_1 | string assetid of the paint layout you want to use on asset_1 |
paint_layout_2 | string assetid of the paint layout you want to use on asset_2 |
function | dataCallback Custom callback functio |
Returns the context we should be using based on the settings on the Context Configuration screen
boolean | all_info wheather to get all information of the context or just get the id/name pairs(by default set to FALSE) |
function | dataCallback Custom callback function |
Returns details of all the contexts in a system
boolean | all_info wheather to get all information of the context of just get the id/name pairs(by default set to FALSE) |
function | dataCallback Custom callback function |
Returns the current context active on the system
boolean | all_info wheather to get all information of the context of just get the id/name pairs(by default set to FALSE) |
function | dataCallback Custom callback function |
Set the System to the Passed context
string | context_id the id of the context we want to activate |
function | dataCallback Custom callback functio |
Restores the previous context
string | context_id the id of the context we want to activate |
function | dataCallback Custom callback functio |
Definition at line 33 of file js_api_standard_function_list.inc.