|
Cheetah
|
Public Member Functions | |
| __construct ($aCustomForm) | |
| uploadPhotos ($sTag, $sCat, $sName='images', $sTitle='images_titles', $sTitleAlt='title') | |
| uploadVideos ($sTag, $sCat, $sName='videos', $sTitle='videos_titles', $sTitleAlt='title') | |
| uploadSounds ($sTag, $sCat, $sName='sounds', $sTitle='sounds_titles', $sTitleAlt='title') | |
| uploadFiles ($sTag, $sCat, $sName='files', $sTitle='files_titles', $sTitleAlt='title') | |
| insertMedia ($iEntryId, $aMedia, $sMediaType) | |
| updateMedia ($iEntryId, $aMediaAdd, $aMediaDelete, $sMediaType) | |
| deleteMedia ($iEntryId, $aMedia, $sMediaType) | |
| _validateMediaIds ($aMedia) | |
| _getFilesInEntry ($sModuleName, $sServiceMethod, $sName, $sMediaType, $iIdProfile, $iEntryId) | |
| processMedia ($iEntryId, $iProfileId) | |
| generateCustomMediaTemplates ($iProfileId, $iEntryId, $iThumb=0) | |
| processMembershipChecksForMediaUploads (&$aInputs) | |
Public Member Functions inherited from ChBaseFormView | |
| getCode () | |
| genForm () | |
| genTable () | |
| genRow (&$aInput) | |
| genRowStandard (&$aInput) | |
| genRowSelectBox (&$aInput) | |
| genRowHeaders (&$aInput) | |
| genRowBlockHeader (&$aInput) | |
| genBlockEnd () | |
| genWrapperInput ($aInput, $sContent) | |
| genInput (&$aInput) | |
| getInputId (&$aInput) | |
| genInputStandard (&$aInput) | |
| genInputButton (&$aInput) | |
| genInputTextarea (&$aInput) | |
| addHtmlEditor ($iViewMode, &$aInput) | |
| genInputSelect (&$aInput) | |
| genInputSelectBox (&$aInput, $sInfo='', $sError='') | |
| genInputSelectMultiple (&$aInput) | |
| genInputCheckboxSet (&$aInput) | |
| genInputRadioSet (&$aInput) | |
| genInputCaptcha (&$aInput) | |
| genLabel (&$aInput) | |
| convertArray2Attrs ($a) | |
| genInfoIcon ($sInfo) | |
| genErrorIcon ( $sError='') | |
| getOpenTbody ($aAttrsAdd=false) | |
| getCloseTbody () | |
| getInput ($sType, $sAttrs, $sContent='') | |
| addCssJs ($isDateControl=false, $isDateTimeControl=false) | |
Public Member Functions inherited from ChWsbForm | |
| initChecker ($aValues=array()) | |
| insert ($aValsToAdd=array()) | |
| update ($val, $aValsToAdd=array()) | |
| generateUri () | |
| getCleanValue ($sName) | |
| isSubmitted () | |
| isValid () | |
| isSubmittedAndValid () | |
| genCsrfToken ($bReturn=false) | |
| getCsrfTokenTime () | |
Public Attributes | |
| $_aMedia = array() | |
Public Attributes inherited from ChBaseFormView | |
| $bEnableErrorIcon = true | |
| $sCode | |
| $_sCodeAdd = '' | |
| $_isTbodyOpened = false | |
| $_isDateControl = false | |
| $_isDateTimeControl = false | |
Public Attributes inherited from ChWsbForm | |
| $_isValid = true | |
| $_sCheckerHelper | |
| $aFormAttrs | |
| $aTableAttrs | |
| $aInputs | |
| $aParams | |
| $id | |
Additional Inherited Members | |
Static Public Member Functions inherited from ChWsbForm | |
| static | getSubmittedValue ($sKey, $sMethod) |
| static | getCsrfToken () |
Base class for form which is using a lot of media uploads
Definition at line 13 of file ChWsbFormMedia.php.
| ChWsbFormMedia::__construct | ( | $aInfo | ) |
Constructor
| array | $aInfo | Form contents |
$aInfo['params'] = array( 'remove_form' => true|false, );
Reimplemented from ChTemplFormView.
Definition at line 17 of file ChWsbFormMedia.php.
| ChWsbFormMedia::_getFilesInEntry | ( | $sModuleName, | |
| $sServiceMethod, | |||
| $sName, | |||
| $sMediaType, | |||
| $iIdProfile, | |||
| $iEntryId | |||
| ) |
@access private
Definition at line 219 of file ChWsbFormMedia.php.
| ChWsbFormMedia::_validateMediaIds | ( | $aMedia | ) |
@access private
Definition at line 202 of file ChWsbFormMedia.php.
| ChWsbFormMedia::deleteMedia | ( | $iEntryId, | |
| $aMedia, | |||
| $sMediaType | |||
| ) |
Delete media from database
| $iEntryId | associated entry id |
| $aMedia | media id's array |
| $sMediaType | media type, like images, videos, etc |
Definition at line 193 of file ChWsbFormMedia.php.
| ChWsbFormMedia::generateCustomMediaTemplates | ( | $iProfileId, | |
| $iEntryId, | |||
$iThumb = 0 |
|||
| ) |
Generate templates for custom media elements
| $iProfileId | current profile id |
| $iEntryId | associated entry id |
Definition at line 316 of file ChWsbFormMedia.php.
| ChWsbFormMedia::insertMedia | ( | $iEntryId, | |
| $aMedia, | |||
| $sMediaType | |||
| ) |
Insert media to database
| $iEntryId | associated entry id |
| $aMedia | media id's array |
| $sMediaType | media type, like images, videos, etc |
Definition at line 167 of file ChWsbFormMedia.php.
| ChWsbFormMedia::processMedia | ( | $iEntryId, | |
| $iProfileId | |||
| ) |
process media upload updates call it after successful call $form->insert/update functions
| $iEntryId | associated entry id |
Reimplemented in ChStoreFormAdd.
Definition at line 265 of file ChWsbFormMedia.php.
| ChWsbFormMedia::processMembershipChecksForMediaUploads | ( | & | $aInputs | ) |
Definition at line 366 of file ChWsbFormMedia.php.
| ChWsbFormMedia::updateMedia | ( | $iEntryId, | |
| $aMediaAdd, | |||
| $aMediaDelete, | |||
| $sMediaType | |||
| ) |
Update media in database First it delete media ids from database, then adds new Be carefull if you store more information than just a pair of ids
| $iEntryId | associated entry id |
| $aMedia | media id's array |
| $sMediaType | media type, like images, videos, etc |
Definition at line 181 of file ChWsbFormMedia.php.
| ChWsbFormMedia::uploadFiles | ( | $sTag, | |
| $sCat, | |||
$sName = 'files', |
|||
$sTitle = 'files_titles', |
|||
$sTitleAlt = 'title' |
|||
| ) |
upload files to files module
| $sTag | a tag to accociate with an image |
| $sCat | a category to accociate with an image |
| $sName | form field name with a files |
| $sTitle | form field name with image titles |
| $sTitleAlt | alternative form field name with image title |
Definition at line 136 of file ChWsbFormMedia.php.
| ChWsbFormMedia::uploadPhotos | ( | $sTag, | |
| $sCat, | |||
$sName = 'images', |
|||
$sTitle = 'images_titles', |
|||
$sTitleAlt = 'title' |
|||
| ) |
upload photos to photos module
| $sTag | a tag to accociate with an image |
| $sCat | a category to accociate with an image |
| $sName | form field name with a files |
| $sTitle | form field name with image titles |
| $sTitleAlt | alternative form field name with image title |
Definition at line 37 of file ChWsbFormMedia.php.
| ChWsbFormMedia::uploadSounds | ( | $sTag, | |
| $sCat, | |||
$sName = 'sounds', |
|||
$sTitle = 'sounds_titles', |
|||
$sTitleAlt = 'title' |
|||
| ) |
upload sounds to sounds module
| $sTag | a tag to accociate with an image |
| $sCat | a category to accociate with an image |
| $sName | form field name with a files |
| $sTitle | form field name with image titles |
| $sTitleAlt | alternative form field name with image title |
Definition at line 103 of file ChWsbFormMedia.php.
| ChWsbFormMedia::uploadVideos | ( | $sTag, | |
| $sCat, | |||
$sName = 'videos', |
|||
$sTitle = 'videos_titles', |
|||
$sTitleAlt = 'title' |
|||
| ) |
upload videos to videos module
| $sTag | a tag to accociate with an image |
| $sCat | a category to accociate with an image |
| $sName | form field name with a files |
| $sTitle | form field name with image titles |
| $sTitleAlt | alternative form field name with image title |
Definition at line 70 of file ChWsbFormMedia.php.
| ChWsbFormMedia::$_aMedia = array() |
Definition at line 15 of file ChWsbFormMedia.php.