Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
Image_Edit_Fns Class Reference
Inheritance diagram for Image_Edit_Fns:
File_Edit_Fns Asset_Edit_Fns MySource_Object Data_Source_Graph_Edit_Fns Thumbnail_Edit_Fns

Public Member Functions

 paintFileUpload (&$asset, &$o, $prefix)
 
 paintEmbeddedData (&$asset, &$o, $prefix)
 
 processFileUpload (&$asset, &$o, $prefix, $info=Array(), $redirect_in_limbo=TRUE, $asset_cloned=FALSE)
 
 paintCreateEditor (&$asset, &$o, $prefix)
 
 processCreateEditor (&$asset, &$o, $prefix)
 
 paintEditor (&$asset, &$o, $prefix)
 
 processEditor (&$asset, $o, $prefix)
 
 hasVarieties (&$asset, $prefix)
 
 paintCurrentVarieties (&$asset, &$o, $prefix)
 
 processCurrentVarieties (&$asset, $o, $prefix)
 
 paintNewVariety (&$asset, &$o, $prefix)
 
 processNewVariety (&$asset, $o, $prefix)
 
 printExistingFileInfo (&$asset)
 
 getChosenFileInfo ($prefix)
 
 getPreUploadOptions (&$asset)
 
 _paintApplet (&$asset, &$o, $prefix)
 
 _recreateVarietyImages (&$asset)
 
 _extractImageMetadata ($filename)
 
- Public Member Functions inherited from File_Edit_Fns
 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 ()
 

Additional Inherited Members

- Data Fields inherited from Asset_Edit_Fns
 $static_screens
 
- Protected Member Functions inherited from File_Edit_Fns
 havePreUploadedFiles (File $asset, $prefix)
 
 getPreuploadOptions (File $asset)
 

Detailed Description

Definition at line 32 of file image_edit_fns.inc.

Member Function Documentation

_extractImageMetadata (   $filename)

Extracts photoshop metadata from an image file

Parameters
string$filenamefilename to extract metadata from
Returns
void private

Definition at line 653 of file image_edit_fns.inc.

_paintApplet ( $asset,
$o,
  $prefix 
)

Paint the Image Editor Applet, including the JS and hidden fields it needs

We add our onsubmit function ourselves rather than letting the Backend_Outputter do it, since the backend outputter will let us down in an asset builder Return TRUE if the applet was printed OK

Parameters
object&$assetthe file asset
object&$othe outputter class
string$prefixprefix for form elements
Returns
boolean private

Definition at line 521 of file image_edit_fns.inc.

_recreateVarietyImages ( $asset)

Regenerates the variety images after an upload or fix It is the responsability of the caller to save the images attributes afterward

Parameters
object&$assetthe file asset
Returns
void private

Definition at line 631 of file image_edit_fns.inc.

getChosenFileInfo (   $prefix)

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

In this case the pre-uploaded file may have been uploaded by the image editor applet, and we want to make sure the filename typed into the applet is used

Parameters
string$prefixprefix for form elements
Returns
array protected

Definition at line 470 of file image_edit_fns.inc.

getPreUploadOptions ( $asset)

Get a list of pre-uploaded files available for use

In this case we restrict the options to be valid image file types Returns value to be used with combo_box

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

Definition at line 493 of file image_edit_fns.inc.

hasVarieties ( $asset,
  $prefix 
)

Find out is there are any varieties Returns TRUE if edit interface to be printed

Parameters
object&$assetthe file asset
string$prefixthe prefix for this asset
Returns
boolean public

Definition at line 282 of file image_edit_fns.inc.

paintCreateEditor ( $asset,
$o,
  $prefix 
)

Prints the image editor applet as it should appear in the create screen

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

Definition at line 187 of file image_edit_fns.inc.

paintCurrentVarieties ( $asset,
$o,
  $prefix 
)

Paint the varieties editing section Returns TRUE if edit interface printed

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

Definition at line 301 of file image_edit_fns.inc.

paintEditor ( $asset,
$o,
  $prefix 
)

Print the "edit image" screen Returns TRUE if edit interface printed

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

Definition at line 232 of file image_edit_fns.inc.

paintEmbeddedData ( $asset,
$o,
  $prefix 
)

Prints the list of embedded data

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

Definition at line 81 of file image_edit_fns.inc.

paintFileUpload ( $asset,
$o,
  $prefix 
)

Prints the interface for uploading a file

In this case it gives us the option of launching the image editor too

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

Definition at line 48 of file image_edit_fns.inc.

paintNewVariety ( $asset,
$o,
  $prefix 
)

Print the new variety section Returns TRUE if edit interface printed

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

Definition at line 389 of file image_edit_fns.inc.

printExistingFileInfo ( $asset)

Prints info about the current uploaded file

Parameters
object&$assetthe file asset
Returns
void public

Definition at line 448 of file image_edit_fns.inc.

processCreateEditor ( $asset,
$o,
  $prefix 
)

Process the results of the image editor in the create screen

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

Definition at line 210 of file image_edit_fns.inc.

processCurrentVarieties ( $asset,
  $o,
  $prefix 
)

Process the varieties editing section Returns TRUE if edit interface printed

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

Definition at line 340 of file image_edit_fns.inc.

processEditor ( $asset,
  $o,
  $prefix 
)

Process the "edit image" screen Returns TRUE if edit interface printed

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

Definition at line 260 of file image_edit_fns.inc.

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

Processes the interface for uploading a file

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
object&$assetthe file asset
object&$othe outputter class
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 136 of file image_edit_fns.inc.

processNewVariety ( $asset,
  $o,
  $prefix 
)

Process the "edit image" screen Returns TRUE if edit interface printed

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

Definition at line 418 of file image_edit_fns.inc.


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