Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
File_Edit_Fns Class Reference
Inheritance diagram for File_Edit_Fns:
Asset_Edit_Fns MySource_Object CSS_File_Edit_Fns Excel_Doc_Edit_Fns FLV_File_Edit_Fns Image_Edit_Fns JS_File_Edit_Fns MP3_File_Edit_Fns PDF_File_Edit_Fns Powerpoint_Doc_Edit_Fns Rtf_File_Edit_Fns Text_File_Edit_Fns Video_File_Edit_Fns Word_Doc_Edit_Fns Xml_File_Edit_Fns Xsl_File_Edit_Fns

Public Member Functions

 File_Edit_Fns ()
 
 paintFilename (&$asset, &$o, $prefix)
 
 processFilename (&$asset, &$o, $prefix)
 
 paintFileUpload (File $asset, Backend_Outputter $o, $prefix)
 
 processFileUploadPreUpload (File $asset, $o, $prefix, Array $info=Array(), $redirect_in_limbo=TRUE)
 
 processFileUpload (File $asset, &$o, $prefix, Array $info=Array(), $redirect_in_limbo=TRUE, $asset_cloned=FALSE)
 
 processFileChooser (File $asset, $o, $prefix, $create=FALSE)
 
 removeOldFile (File $asset, &$existing, File_Versioning $fv)
 
 getNewFile (File $asset, $name, Array $info)
 
 getChosenFileInfo ($prefix)
 
 printExistingFileInfo (File $asset)
 
- Public Member Functions inherited from Asset_Edit_Fns
 Asset_Edit_Fns ()
 
 paintPaths (&$asset, &$o, $prefix)
 
 paintEditRemapURLs (&$asset, &$o, $prefix)
 
 processPaths (&$asset, &$o, $prefix)
 
 processEditRemapURLs (&$asset, &$o, $prefix)
 
 paintURLs (&$asset, &$o, $prefix)
 
 paintAddRemapURLs (&$asset, &$o, $prefix)
 
 processAddRemapURLs (&$asset, &$o, $prefix)
 
 isWorkflowComplete (&$asset)
 
 paintNoticeLinkedAsset (&$asset, $link_value, $type_codes=Array(), $field_name='', $multiple=FALSE)
 
 processNoticeLinkedAsset (&$asset, $link_value, $field_name='', $multiple=FALSE)
 
 isSearchInstalled (&$asset, $prefix)
 
 isBeingCreated (&$asset)
 
 isNotBeingCreated (&$asset)
 
 paintAutomaticRemapSetting (&$asset, &$o, $prefix)
 
 paintCreateLink (&$asset, &$o, $prefix)
 
- Public Member Functions inherited from MySource_Object
 MySource_Object ()
 
 __sleep ()
 
 __wakeup ()
 

Protected Member Functions

 havePreUploadedFiles (File $asset, $prefix)
 
 getPreuploadOptions (File $asset)
 

Additional Inherited Members

- Data Fields inherited from Asset_Edit_Fns
 $static_screens
 

Detailed Description

Definition at line 31 of file file_edit_fns.inc.

Member Function Documentation

Constructor

Definition at line 39 of file file_edit_fns.inc.

getChosenFileInfo (   $prefix)

Get the info on the pre-uploaded file chosen by the user

Parameters
string$prefixprefix for form elements
Returns
array public

Definition at line 554 of file file_edit_fns.inc.

getNewFile ( File  $asset,
  $name,
Array  $info 
)

Get the new file of a file asset

Parameters
File&$assetthe file asset we are in
string$namethe new name for the file asset
array&$infothe info array for the new file
Returns
void public

Definition at line 516 of file file_edit_fns.inc.

getPreuploadOptions ( File  $asset)
protected

Get a list of pre-uploaded files available for use

Subclasses can override this to restrict file types Return value format: Array(value => value to be used with combo_box)

Parameters
Asset$assetThe asset that might use the files
Returns
array protected

Definition at line 461 of file file_edit_fns.inc.

havePreUploadedFiles ( File  $asset,
  $prefix 
)
protected

Find out if there are any pre-uploaded files we can use, returns TRUE if there is

Parameters
Asset$assetThe asset that might use the files
string$prefixthe prefix for this asset
Returns
boolean protected

Definition at line 439 of file file_edit_fns.inc.

paintFilename ( $asset,
$o,
  $prefix 
)

Prints the interface for editing filename

Parameters
object&$assetthe file asset
object&$othe Backend Outputter object
string$prefixprefix for form elements
Returns
boolean public

Definition at line 58 of file file_edit_fns.inc.

paintFileUpload ( File  $asset,
Backend_Outputter  $o,
  $prefix 
)

Prints the interface for uploading a file

Parameters
File$assetthe file asset
Backend_Outputter$othe Backend Outputter object
string$prefixprefix for form elements
Returns
boolean public

Definition at line 122 of file file_edit_fns.inc.

printExistingFileInfo ( File  $asset)

Prints info about the current uploaded file

Parameters
File$assetthe file asset
Returns
void public

Definition at line 576 of file file_edit_fns.inc.

processFileChooser ( File  $asset,
  $o,
  $prefix,
  $create = FALSE 
)

Process the interface where you can choose a pre-uploaded file

Returns TRUE if a file was processed

Parameters
File$assetthe file asset
Backend_Outputter$othe Backend Outputter object
string$prefixprefix for form elements
boolean$createTRUE if this is being called from createAdditional and should run even though the asset is not yet created
Returns
boolean public

Definition at line 411 of file file_edit_fns.inc.

processFilename ( $asset,
$o,
  $prefix 
)

Processes the interface for editing filename

Parameters
object&$assetthe file asset
object&$othe Backend Outputter object
string$prefixprefix for form elements
Returns
boolean public

Definition at line 81 of file file_edit_fns.inc.

processFileUpload ( File  $asset,
$o,
  $prefix,
Array  $info = Array(),
  $redirect_in_limbo = TRUE,
  $asset_cloned = FALSE 
)

Processes the interface for uploading a file

NOTE: this function is called from several places other than by asset_edit_interface, for example file::_createAdditional and trigger_action_replace_file::execute

If you want to process an upload of a file that was not uploaded through PHP (possible because of FTP or it was in a tar archive), ensure you pass the information about the file in the $info array. The fields required are: name => the filename without path (eg file.txt) tmp_name => the location of the file on the file system non_uploaded_file => must equal TRUE

Parameters
File$assetthe file asset
Backend_Outputter$othe Backend Outputter object
string$prefixprefix for form elements
array$infoinfo about the uploaded file
boolean$redirect_in_limboredirect when the file name changes in limbo
boolean$asset_clonedto check if we creating a new asset or just cloning
Returns
boolean public

Definition at line 259 of file file_edit_fns.inc.

processFileUploadPreUpload ( File  $asset,
  $o,
  $prefix,
Array  $info = Array(),
  $redirect_in_limbo = TRUE 
)

Processes the interface for uploading a file

Parameters
File$assetthe file asset
Backend_Outputter$othe Backend Outputter object
string$prefixprefix for form elements
array$infoinfo about the uploaded file
boolean$redirect_in_limboredirect when the file name changes in limbo
Returns
boolean public

Definition at line 221 of file file_edit_fns.inc.

removeOldFile ( File  $asset,
$existing,
File_Versioning  $fv 
)

Remove the old file of a file asset

Parameters
File$assetthe file asset we are in
array&$existinginfo about existing
File_Versioning$fvthe file versioning object
Returns
void public

Definition at line 483 of file file_edit_fns.inc.


The documentation for this class was generated from the following file: