Squiz Matrix
4.12.2
|
Static Public Member Functions | |
static | paintJSFunctions (JS_Api $js_api_asset) |
Definition at line 31 of file js_api_enhanced_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. | +–——————————————————————+
Convert a JSON string to object
Get all the properties of an object as an array
object | obj The object to get the parameters for |
Convert a variable to a boolean
The API constructor
API methods
Validates options and returns merged data
Cleans a URL parameter to replace #,&,?,+ chars into entities
string | value the value to convert |
batches multiple JS API calls and executs them in one HTTP Request
object | options JSON string of options { functions: json json of all the function and its respective arguments to be passed in dataCallback: function Custom callback function } |
Get general information about an asset
object | options JSON string of options { asset_id: string/int Id of the asset we are getting info for get_attributes: boolean Set this to 1 to also return an assets attributes dataCallback: function Custom callback function } |
Gets child count for the passed asset uptill certain level
object | options JSON string of options { asset_id: string/int Id of the asset we are getting info for level: int Number of levels to check, default : 'all' dataCallback: function Custom callback function } |
Gets lineage of the passed asset until the root_folder
object | options JSON string of options { asset_url: string url(including protocol) or the assetid of the asset significant_link_only: boolean if get to get back significant (type_1 and type_2) links only dataCallback: function Custom callback function } |
Gets a single lineage of the passed url
object | options JSON string of options { asset_url: string url(including protocol) or the assetid of the asset dataCallback: function Custom callback function } |
Gets a single url based on the lineage passed (asset ids)
object | options JSON string of options { param array lineage asset id array to represent lineage from top to bottom dataCallback: function Custom callback function } |
This will get all attribute value
object | options JSON string of options { asset_id: string/int Id of the asset we are getting info for dataCallback: function Custom callback function } |
This will set an attribute value
object | options JSON string of options { asset_id: string/int Id of the asset we are setting attributes for attr_name: string Name of the attribute to change attr_val: string Value to change the attribute to dataCallback: function Custom callback function } |
Sets the passed attributes for the asset
object | options JSON string of options { asset_id: string/int Id of the asset we are setting attributes for field_info: json Attribute name and their respective values to be changed to dataCallback: function Custom callback function } |
This will get metadata values
object | options JSON string of options { asset_id: string/int Id of the asset we are getting info for dataCallback: function Custom callback function } |
Get the value of a metadata field
object | options JSON string of options { asset_id: string/int Id of the asset we are setting metadata for field_id: string/int The asset id of the metadata field field_val: string The value to set for the metadata field dataCallback: function Custom callback function } |
Set the values of multiple metadata fields
object | options JSON string of options { asset_id: string/int Id of the asset we are setting attributes for field_info: json Metadata field id and their respective values to be changed to dataCallback: function Custom callback function } |
This will send an asset to the trash
object | options JSON string of options { asset_ids: string/array A single string asset id, or array of strings for asset ids dataCallback: function Custom callback function } |
This will return child asset ids of the passed asset
object | options JSON string of options { asset_id: string/int Id of the asset we are setting attributes for levels: int Number of levels to return type_codes: array asset type_code that we want back link_types: array type of links we are looking for Valid Values - SQ_LINK_TYPE_1, SQ_LINK_TYPE_2, SQ_LINK_TYPE_3, SQ_LINK_NOTICE link_value: array link values we are looking for get_attributes: boolean if we are getting non standard attribute values of the assets(FALSE by default) dataCallback: function Custom callback function } |
This will return parent asset ids of the passed asset
object | options JSON string of options { asset_id: string/int Id of the asset we are setting attributes for levels: int Number of levels to return type_codes: array asset type_code that we want back link_types: array type of links we are looking for Valid Values - SQ_LINK_TYPE_1, SQ_LINK_TYPE_2, SQ_LINK_TYPE_3, SQ_LINK_NOTICE link_value: array link values we are looking for get_attributes: boolean if we are getting non standard attribute values of the assets(FALSE by default) dataCallback: function Custom callback function } |
This returns permissions for an asset
object | options JSON string of options { asset_id: string/int Id of the asset to get permissions for level: int 1=READ 2=WRITE 3=ADMIN, default to READ dataCallback: function Custom callback function } |
Creates an asset
object | options JSON string of options { parent_id: string/int parentid of the asset to create type_code: string type of asset to create asset_name: string name for new asset link_type: string type of link to create link_value: string value of link sort_order: int order in the tree under the parent is_dependant: boolean dependant to parent? is_exclusive: boolean exclusive to parent? extra_attributes: boolean allows additional attributes on create attributes: string String of additional query string containing key/pair values dataCallback: function Custom callback function } |
Creates a file asset
object | options JSON string of options { parentID: string/int parentid of the asset to create type_code: string type of asset to create friendly_name: string name for new asset link_type: string type of link to create link_value: string value of link dataCallback: function Custom callback function } |
Returns asset type codes installed on the system
object | options JSON string of options { dataCallback: function Custom callback function } |
Gets information for the lock type passed for an asset
object | options JSON string of options { asset_id: string/int Id of the asset to get permissions for screen_name: string The screen to get locks for dataCallback: function Custom callback function } |
Acquires locks on the given asset. if the locks were already acquired by current user then they are updated
object | options JSON string of options { asset_id: string/int Id of the asset to get permissions for screen_name: string the screen to get locks on, by default 'all' dependants_only: boolean whether dependants only or all children, defaults to true force_acquire: boolean whether to attempt to forceably acquire the lock or not, defaults to false dataCallback: function Custom callback function } |
Releases locks on the given screen
object | options JSON string of options { asset_id: string/int Id of the asset to get permissions for screen_name: string the screen to release locks for dataCallback: function Custom callback function } |
Creates a link between two assets with passed information
object | options JSON string of options { parent_id: string/int Major asset id we are linking from child_id: string/int Minor asset id we are linking to link_type: string Type of link to create link_value: string Value of the link sort_order: int Order in the tree is_dependant: boolean Dependant to parent is_exclusive: boolean Exclusive to parent dataCallback: function Custom callback function } |
Removes a link between a parent and child
object | options JSON string of options { parent_id: string/int Major asset id we are linking from child_id: string/int Minor asset id we are linking to link_type: string 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 link_value: string value of link we are looking for ('' by default) dataCallback: function Custom callback function } |
Removes multiple links between a parent and child pairs
object | options JSON string of options { link_info: json json object containing link info as per removeLink() function of this API dataCallback: function Custom callback function } |
Moves a link from one parent to another
object | options JSON string of options { old_parent_id: string/int Id of old parent child_id: string/int Id of the child old_link_type: string 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 old_link_value: string Value of link we are searching for between given assets ('' by default) new_parent_id: string/int Id of the new parent new_link_type: string 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 new_link_value: string Value of link to use ('' by default) new_position: int The new position dataCallback: function Custom callback function } |
Updates a link with provided information
object | options JSON string of options { parent_id: string/int Id of parent child_id: string/int Id of child existing_link_type: string 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 existing_link_value: string existing link value betweent the assets ('' by default) link_type: string 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 link_value: string Value of link to be updated to ('' by default) sort_order: int The new position locked: boolean the asset link lock status(locked by default) dataCallback: function Custom callback function } |
Updates multiple links
object | options JSON string of options { link_info: json object containing all the information as per updateLink() of this API dataCallback: function Custom callback function } |
Returns the link id between a parent and child
object | options JSON string of options { parent_id: string/int Id of parent child_id: string/int Id of child link_type: string 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 link_value: string value of link we are looking for ('' by default) all_info: boolean if we want all the link information or just linkid dataCallback: function Custom callback function } |
This will return tree information for children
object | options JSON string of options { asset_id: string/int Id of the asset to get children of levels: int Number of levels to return dataCallback: function Custom callback function } |
This will get replacements for the passed in keywords
object | options JSON string of options { asset_id: string/int Id of the asset to get keyword replacements for keywords_array: array Array of keywords to get replacements for dataCallback: function Custom callback function } |
This will set Asset to the status that is passed in
object | options JSON string of options { asset_id: string/int Id of the asset to set status to status: int status tha asset is to be set to cascade: boolean if to cascade the status to non-dependant children(false by default) workflow_stream: string workflow stream to be passed in dataCallback: function Custom callback function } |
gets webpath(s) of the assetid supplied
object | options JSON string of options { asset_id: string/int Id of the asset to get webpaths for dataCallback: function Custom callback function } |
This will set webpath(s) of the assetid supplied
object | options JSON string of options { asset_id: string/int Id of the asset to set webpaths for paths: array new web paths to be assigned to asset auto_remap: boolean if we are auto remaping(default to TRUE) dataCallback: function Custom callback function } |
This function will tell us if we have a running workflow on the passed assetid
object | options JSON string of options { asset_id: string/int Id of the asset to get workflow schemas on granted: mixed what is the status of workflow we are trying to get (default to NULL) TRUE => granted, FALSE => denied, NULL => get all running: boolean if we only are getting wokflows that are running (default to FALSE) dataCallback: function 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
object | options JSON string of options { asset_id: string/int Id of the asset to update content for content: string new content of the asset dataCallback: function 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
object | options JSON string of options { asset_id: string/int Asset under which the assets are to be imported under filePath: string path to file on the file system dataCallback: function Custom callback function } |
Returns an array of roles and the users/groups which can perform it
object | options JSON string of options { asset_id: string/int the assetid of the asset the role is applied to role_id: string/int the assetid of the the role that is applied user_id: string/int the assetid of the user performing the role include_assetid: boolean whether to include the assetid in the returned array include_globals: boolean whether to query the role view which includes expanded global roles as individual users expand_groups: boolean when TRUE, any groups defined within a role will be replaced with the userids in that group If FALSE, return the groupids inc_dependants: boolean If false it will filter out the dependant assets include_parents: boolean When userid is specified. This will include the roles applied directly to the user and indirectly to user parent groups. type_codes: array When include_assetid is TRUE. This is a type code filter for returned assetids. strict_type_code: boolean Use strict type code for type code filter dataCallback: function Custom callback function } |
Performs HTMLTidy on the passed content and returns cleaned up code
object | options JSON string of options { content: string the string content that needs to be cleaned up dataCallback: function Custom callback function } |
Clones the given asset under the parent passed in
object | options JSON string of options { asset_id: string/int asset under which the assets are to be imported under new_parent string/int 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 '') dataCallback: function Custom callback function } |
gets the content (with or without paint layout) and check for the difference
object | options JSON string of options { assetid_1: string/int assetid of first asset assetid_2: string/int 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 dataCallback: function Custom callback function } |
Returns the context we should be using based on the settings on the Context Configuration screen
object | options JSON string of options { all_info: boolean wheather to get all information of the context or just get the id/name pairs(by default set to FALSE) dataCallback: function Custom callback function } |
Returns the current context active on the system
object | options JSON string of options { all_info: boolean wheather to get all information of the context or just get the id/name pairs(by default set to FALSE) dataCallback: function Custom callback function } |
Returns details of all the contexts in a system
object | options JSON string of options { all_info: boolean wheather to get all information of the context or just get the id/name pairs(by default set to FALSE) dataCallback: function Custom callback function } |
Set the System to the Passed context
object | options JSON string of options { assetid_1: string/int assetid of first asset dataCallback: function Custom callback function } |
Restores the previous context
object | options JSON string of options { assetid_1: string/int assetid of first asset dataCallback: function Custom callback function } |
gets the content (with or without paint layout) and check for the difference
object | options JSON string of options { assetid: string/int the asset to get the info of the schemas applied to granted: boolean type of access : TRUE = applied, FALSE = denied cascades: boolean does this schema cascade to newly created assets? dataCallback: function Custom callback function } |
Shortcut function for sending post data
Definition at line 34 of file js_api_enhanced_function_list.inc.