phpDocumentor Watermark
Classes
[ class tree: Watermark ] [ index: Watermark ] [ all elements ]

Class: WatermarkHelper

Source Location: /modules/watermark/classes/WatermarkHelper.class

Class WatermarkHelper

Method Summary
array   createWatermarkImage()   Create new WatermarkImage from given form data.
array   deleteWatermarkImageById()   Delete a watermark image.
string   determineMimeType()   Determine uploaded mime type
array   fetchWatermarkedItemIds()   Find items watermarked with the given watermark image.
array   fetchWatermarkIdsByOwnerId()   Return all watermark ids owned by a given user id
array   fetchWatermarks()   Return a map of watermarks available to the active user
array   handleEditRequest()   handleRequest for WatermarkSiteAdminEdit and UserWatermarkEdit
GalleryStatus   loadEditTemplate()   loadTemplate for WatermarkSiteAdminEdit and UserWatermarkEdit
GalleryStatus   watermarkItem()   Apply the given watermark to the given item. Expect the item to be locked already.

[ Top ]
Methods
createWatermarkImage  [line 458]

  array createWatermarkImage( &$form, [boolean $isPublic = false], array $form  )

Create new WatermarkImage from given form data.

Parameters:
array   $form: 
boolean   $isPublic:  (optional) true to make watermark available to all users
   &$form: 

API Tags:
Return:  GalleryStatus a status code WatermarkImage


[ Top ]
deleteWatermarkImageById  [line 194]

  array deleteWatermarkImageById( int $itemId, [boolean $forceDelete = false]  )

Delete a watermark image.

Parameters:
int   $itemId:  id of watermark image
boolean   $forceDelete:  (optional) if true, delete even if watermark is used (and remove those uses)

API Tags:
Return:  GalleryStatus a status object boolean true if deleted


[ Top ]
determineMimeType  [line 445]

  string determineMimeType( &$form  )

Determine uploaded mime type

Parameters:
   &$form: 

API Tags:
Return:  mime type
Deprecated:  After the next major API bump remove this module and call the core api directly


[ Top ]
fetchWatermarkedItemIds  [line 157]

  array fetchWatermarkedItemIds( WatermarkImage $watermark  )

Find items watermarked with the given watermark image.

Parameters:
WatermarkImage   $watermark: 

API Tags:
Return:  GalleryStatus a status code array (int GalleryItem id, ...)


[ Top ]
fetchWatermarkIdsByOwnerId  [line 125]

  array fetchWatermarkIdsByOwnerId( int $ownerId  )

Return all watermark ids owned by a given user id

Parameters:
int   $ownerId: 

API Tags:
Return:  GalleryStatus a status code array of itemIds


[ Top ]
fetchWatermarks  [line 49]

  array fetchWatermarks( [int $count = null], [int $offset = null], [string $substring = null]  )

Return a map of watermarks available to the active user

You can specify how many items to list, and where the windows is in the list of all items.

Parameters:
int   $count:  (optional) the number of items desired
int   $offset:  (optional) the start of the range
string   $substring:  (optional) a substring to match

API Tags:
Return:  GalleryStatus a status code array of itemId=>watermark


[ Top ]
handleEditRequest  [line 521]

  array handleEditRequest( array $form, string $view, string $subViewSuccess, string $subViewError  )

handleRequest for WatermarkSiteAdminEdit and UserWatermarkEdit

Parameters:
array   $form:  form data
string   $view:  parent view
string   $subViewSuccess:  subView redirect on success
string   $subViewError:  subView delegate on error

API Tags:
Return:  GalleryStatus a status code array controller results


[ Top ]
loadEditTemplate  [line 680]

  GalleryStatus loadEditTemplate( &$template, &$form, string $formName, string $pageName, array $template, array $form  )

loadTemplate for WatermarkSiteAdminEdit and UserWatermarkEdit

Parameters:
array   $template: 
array   $form:  form data
string   $formName:  form name
string   $pageName:  page name
   &$template: 
   &$form: 

API Tags:
Return:  a status code


[ Top ]
watermarkItem  [line 288]

  GalleryStatus watermarkItem( WatermarkImage $watermark, GalleryDataItem $item, string $xPercent, string $yPercent, array $whichDerivatives  )

Apply the given watermark to the given item. Expect the item to be locked already.

Parameters:
WatermarkImage   $watermark:  the watermark
GalleryDataItem   $item:  an image
string   $xPercent:  the x overlay location (in percentage)
string   $yPercent:  the y overlay location (in percentage)
array   $whichDerivatives:  an array of DERIVATIVE_TYPE_IMAGE_XXX => true/false

API Tags:
Return:  a status code


[ Top ]

Documentation generated on Fri, 08 Oct 2010 06:08:28 -0700 by phpDocumentor 1.3.0RC6