eZ Publish Community Project (Legacy Stack) 2013.4
Class

eZContentUpload

class eZContentUpload

Constants

STATUS_PERMISSION_DENIED

Properties

$Parameters

Methods

eZContentUpload($params = false)

attributes()

hasAttribute($attributeName)

attribute($attributeName)

boolean handleLocalFile(array $result, string $filePath, mixed $location, eZContentObjectTreeNode|false $existingNode, string $nameString = '', string|false $localeCode = false)

Fetches the local file, figures out its MIME-type and creates the proper content object out of it.

boolean handleUpload(array $result, string $httpFileIdentifier, mixed $location, eZContentObjectTreeNode|false $existingNode, string $nameString = '', string|false $localeCode = false)

Fetches the uploaded file, figures out its MIME-type and creates the proper content object out of it.

publishObject($result, $errors, $notices, $object, $publishVersion, $class, $parentNodes, $parentMainNode)

objectFileInfo($contentObject)

bool fetchHTTPFile($httpFileIdentifier, $errors, $file, $mimeData)

Fetches the HTTP-File into $file and fills in MIME-Type information into $mimeData.

findHTTPFileAttribute($dataMap, $fileAttribute)

findRegularFileAttribute($dataMap, $fileAttribute)

findStringAttribute($dataMap, $nameAttribute)

detectClassIdentifier($mime)

detectLocations($classIdentifier, $class, $location, $parentNodes, $parentMainNode)

checkAccess($nodeID, $class)

processNamePattern($variables, $namePattern)

nodeAliasID($nodeName)

setResult($result)

cleanupAll()

findHandler($result, $mimeInfo)

Details

at line 57
public eZContentUpload($params = false)

Parameters

$params

at line 75
public attributes()

at line 83
public hasAttribute($attributeName)

Parameters

$attributeName

at line 91
public attribute($attributeName)

Parameters

$attributeName

at line 217
public boolean handleLocalFile(array $result, string $filePath, mixed $location, eZContentObjectTreeNode|false $existingNode, string $nameString = '', string|false $localeCode = false)

Fetches the local file, figures out its MIME-type and creates the proper content object out of it.

Parameters

array $result Result data, will be filled with information which the client can examine, contains: errors An array with errors, each element is an array with a 'description' entry containing the text
string $filePath Path to file which should be stored
mixed $location The node ID which the new object will be placed or the string 'auto' for automatic placement of type.
eZContentObjectTreeNode|false $existingNode Pass a contentobjecttreenode object to let the uploading be done to an existing object, if not it will create one from scratch.
string $nameString The name of the new object/new version
string|false $localeCode Locale code (eg eng-GB, fre-FR, ...) to use when creating the object or the version.

Return Value

boolean

at line 457
public boolean handleUpload(array $result, string $httpFileIdentifier, mixed $location, eZContentObjectTreeNode|false $existingNode, string $nameString = '', string|false $localeCode = false)

Fetches the uploaded file, figures out its MIME-type and creates the proper content object out of it.

Parameters

array $result Result data, will be filled with information which the client can examine, contains: errors An array with errors, each element is an array with a 'description' entry containing the text
string $httpFileIdentifier The HTTP identifier of the uploaded file, this must match the name of the input tag.
mixed $location The node ID which the new object will be placed or the string 'auto' for automatic placement of type.
eZContentObjectTreeNode|false $existingNode Pass a contentobjecttreenode object to let the uploading be done to an existing object, if not it will create one from scratch.
string $nameString The name of the new object/new version
string|false $localeCode Locale code (eg eng-GB, fre-FR, ...) to use when creating the object or the version.

Return Value

boolean

at line 712
public publishObject($result, $errors, $notices, $object, $publishVersion, $class, $parentNodes, $parentMainNode)

Parameters

$result
$errors
$notices
$object
$publishVersion
$class
$parentNodes
$parentMainNode

at line 787
public objectFileInfo($contentObject)

Parameters

$contentObject

at line 822
public bool fetchHTTPFile($httpFileIdentifier, $errors, $file, $mimeData)

Fetches the HTTP-File into $file and fills in MIME-Type information into $mimeData.

Parameters

$httpFileIdentifier
$errors
$file
$mimeData

Return Value

bool false if something went wrong.

at line 869
public findHTTPFileAttribute($dataMap, $fileAttribute)

Parameters

$dataMap
$fileAttribute

at line 902
public findRegularFileAttribute($dataMap, $fileAttribute)

Parameters

$dataMap
$fileAttribute

at line 935
public findStringAttribute($dataMap, $nameAttribute)

Parameters

$dataMap
$nameAttribute

at line 964
public detectClassIdentifier($mime)

Parameters

$mime

at line 1001
public detectLocations($classIdentifier, $class, $location, $parentNodes, $parentMainNode)

Parameters

$classIdentifier
$class
$location
$parentNodes
$parentMainNode

at line 1126
public checkAccess($nodeID, $class)

Parameters

$nodeID
$class

at line 1158
public processNamePattern($variables, $namePattern)

Parameters

$variables
$namePattern

at line 1209
public nodeAliasID($nodeName)

Parameters

$nodeName

at line 1254
public setResult($result)

Parameters

$result

at line 1301
public cleanupAll()

at line 1314
public findHandler($result, $mimeInfo)

Parameters

$result
$mimeInfo