TwistPHP Documentation

add

File path: dist/twist/Core/Utilities/Asset.utility.php
Namespace: Twist\Core\Utilities
Extends: Base

addAdd an asset to the system, the asset type will be detected automatically. The asset group must be passed in as a group ID.
In the first parameter you can either pass in a string i.e URL, Youtube Link, Co-ordinates or a full path to a file i.e /my/file/to/add/file.ext

Parameters

Name Type Description
$mxdDatamixedn/a
$intGroupIDintegern/a
[$strTitle = '']stringn/a
[$strDescription = '']stringn/a
[$blActive = true]booleann/a

Return Values

void — No return information has been documented for this function.

Example

<?php
//Set the variables for the example
$mxdData 'foo-123';
$intGroupID 124;
$strTitle '';
$strDescription '';
$blActive true;

//Call the function add with the example vars
Twist::Asset() -> add($mxdData$intGroupID$strTitle$strDescription$blActive);