class FileController extends BaseAdminController

Created by JetBrains PhpStorm.

Date: 8/19/13 Time: 3:24 PM

Control View and Action (Model) via Events Control Files and Images

Traits

Symfony\Component\DependencyInjection\ContainerAwareTrait

Constants

EMPTY_FORM_NAME

CONTROLLER_TYPE

TEMPLATE_404

MODULE_RIGHT

Methods

EventDispatcher
getDispatcher()

Return the event dispatcher,

getTranslator()

return the Translator

getMailer()

return an instance of \Swift_Mailer with good Transporter configured.

createForm($name, $type = 'form', array $data = array(), array $options = array())

No description

ContainerInterface
getContainer()

No description

string
getControllerType()

No description

adminLogAppend($resource, $action, $message, $resourceId = null)

Helper to append a message to the admin log.

processTemplateAction( string $template)

This method process the rendering of view called from an admin page

getFileManager()

Get the FileManager

saveFileAjaxAction( int $parentId, string $parentType, string $objectType, array $validMimeTypes = array(), array $extBlackList = array())

Manage how a file collection has to be saved

processImage( UploadedFile $fileBeingUploaded, int $parentId, string $parentType, string $objectType, array $validMimeTypes = array(), array $extBlackList = array())

Process file uploaded

processFile( UploadedFile $fileBeingUploaded, int $parentId, string $parentType, string $objectType, array $validMimeTypes = array(), array $extBlackList = array())

Process file uploaded

saveImageAjaxAction( int $parentId, string $parentType)

Manage how a image collection has to be saved

saveDocumentAjaxAction( int $parentId, string $parentType)

Manage how a document collection has to be saved

getImageListAjaxAction( int $parentId, string $parentType)

Manage how a image list will be displayed in AJAX

getDocumentListAjaxAction( int $parentId, string $parentType)

Manage how a document list will be displayed in AJAX

getImageFormAjaxAction( int $parentId, string $parentType)

Manage how an image list will be uploaded in AJAX

getDocumentFormAjaxAction( int $parentId, string $parentType)

Manage how an document list will be uploaded in AJAX

viewImageAction( int $imageId, string $parentType)

Manage how an image is viewed

viewDocumentAction( int $documentId, string $parentType)

Manage how an document is viewed

updateImageAction( int $imageId, string $parentType)

Manage how an image is updated

updateDocumentAction( int $documentId, string $parentType)

Manage how an document is updated

deleteFileAction( int $fileId, string $parentType, string $objectType, string $eventName)

Manage how a file has to be deleted

deleteImageAction( int $imageId, string $parentType)

Manage how an image has to be deleted (AJAX)

deleteDocumentAction( int $documentId, string $parentType)

Manage how a document has to be deleted (AJAX)

updateFilePositionAction($parentType, $parentId, $objectType, $eventName)

No description

updateImagePositionAction($parentType, $parentId)

No description

updateDocumentPositionAction($parentType, $parentId)

No description

toggleVisibilityFileAction($documentId, $parentType, $objectType, $eventName)

No description

toggleVisibilityDocumentAction($parentType, $documentId)

No description

toggleVisibilityImageAction($parentType, $documentId)

No description

Details

in BaseController at line 128
EventDispatcher getDispatcher()

Return the event dispatcher,

Return Value

EventDispatcher

in BaseController at line 138
Translator getTranslator()

return the Translator

Return Value

Translator

in BaseController at line 545
MailerFactory getMailer()

return an instance of \Swift_Mailer with good Transporter configured.

Return Value

MailerFactory

in BaseController at line 569
BaseForm createForm($name, $type = 'form', array $data = array(), array $options = array())

Parameters

$name
$type
array $data
array $options

Return Value

BaseForm This method builds a thelia form with its name

in BaseController at line 589
ContainerInterface getContainer()

Return Value

ContainerInterface

in BaseAdminController at line 90
string getControllerType()

Return Value

string

in BaseAdminController at line 52
adminLogAppend($resource, $action, $message, $resourceId = null)

Helper to append a message to the admin log.

Parameters

$resource
$action
$message
$resourceId

in BaseAdminController at line 71
Response processTemplateAction( string $template)

This method process the rendering of view called from an admin page

Parameters

string $template the template name

Return Value

Response the response which contains the rendered view

at line 55
FileManager getFileManager()

Get the FileManager

Return Value

FileManager

at line 70
Response saveFileAjaxAction( int $parentId, string $parentType, string $objectType, array $validMimeTypes = array(), array $extBlackList = array())

Manage how a file collection has to be saved

Parameters

int $parentId Parent id owning files being saved
string $parentType Parent Type owning files being saved (product, category, content, etc.)
string $objectType Object type, e.g. image or document
array $validMimeTypes an array of valid mime types. If empty, any mime type is allowed.
array $extBlackList an array of blacklisted extensions.

Return Value

Response

at line 119
ResponseRest processImage( UploadedFile $fileBeingUploaded, int $parentId, string $parentType, string $objectType, array $validMimeTypes = array(), array $extBlackList = array())

Process file uploaded

Parameters

UploadedFile $fileBeingUploaded
int $parentId
string $parentType
string $objectType
array $validMimeTypes
array $extBlackList

Return Value

ResponseRest

at line 145
ResponseRest processFile( UploadedFile $fileBeingUploaded, int $parentId, string $parentType, string $objectType, array $validMimeTypes = array(), array $extBlackList = array())

Process file uploaded

Parameters

UploadedFile $fileBeingUploaded
int $parentId Parent id owning files being saved
string $parentType Parent Type owning files being saved (product, category, content, etc.)
string $objectType Object type, e.g. image or document
array $validMimeTypes an array of valid mime types. If empty, any mime type is allowed.
array $extBlackList an array of blacklisted extensions.

Return Value

ResponseRest

at line 269
Response saveImageAjaxAction( int $parentId, string $parentType)

Manage how a image collection has to be saved

Parameters

int $parentId Parent id owning images being saved
string $parentType Parent Type owning images being saved

Return Value

Response

at line 289
Response saveDocumentAjaxAction( int $parentId, string $parentType)

Manage how a document collection has to be saved

Parameters

int $parentId Parent id owning documents being saved
string $parentType Parent Type owning documents being saved

Return Value

Response

at line 309
Response getImageListAjaxAction( int $parentId, string $parentType)

Manage how a image list will be displayed in AJAX

Parameters

int $parentId Parent id owning images being saved
string $parentType Parent Type owning images being saved

Return Value

Response

at line 326
Response getDocumentListAjaxAction( int $parentId, string $parentType)

Manage how a document list will be displayed in AJAX

Parameters

int $parentId Parent id owning documents being saved
string $parentType Parent Type owning documents being saved

Return Value

Response

at line 343
Response getImageFormAjaxAction( int $parentId, string $parentType)

Manage how an image list will be uploaded in AJAX

Parameters

int $parentId Parent id owning images being saved
string $parentType Parent Type owning images being saved

Return Value

Response

at line 360
Response getDocumentFormAjaxAction( int $parentId, string $parentType)

Manage how an document list will be uploaded in AJAX

Parameters

int $parentId Parent id owning documents being saved
string $parentType Parent Type owning documents being saved

Return Value

Response

at line 377
Response viewImageAction( int $imageId, string $parentType)

Manage how an image is viewed

Parameters

int $imageId Parent id owning images being saved
string $parentType Parent Type owning images being saved

Return Value

Response

at line 411
Response viewDocumentAction( int $documentId, string $parentType)

Manage how an document is viewed

Parameters

int $documentId Parent id owning images being saved
string $parentType Parent Type owning images being saved

Return Value

Response

at line 564
Response updateImageAction( int $imageId, string $parentType)

Manage how an image is updated

Parameters

int $imageId Parent id owning images being saved
string $parentType Parent Type owning images being saved

Return Value

Response

at line 592
Response updateDocumentAction( int $documentId, string $parentType)

Manage how an document is updated

Parameters

int $documentId Parent id owning documents being saved
string $parentType Parent Type owning documents being saved

Return Value

Response

at line 622
Response deleteFileAction( int $fileId, string $parentType, string $objectType, string $eventName)

Manage how a file has to be deleted

Parameters

int $fileId Parent id owning file being deleted
string $parentType Parent Type owning file being deleted
string $objectType the type of the file, image or document
string $eventName the event type.

Return Value

Response

at line 696
Response deleteImageAction( int $imageId, string $parentType)

Manage how an image has to be deleted (AJAX)

Parameters

int $imageId Parent id owning image being deleted
string $parentType Parent Type owning image being deleted

Return Value

Response

at line 709
Response deleteDocumentAction( int $documentId, string $parentType)

Manage how a document has to be deleted (AJAX)

Parameters

int $documentId Parent id owning document being deleted
string $parentType Parent Type owning document being deleted

Return Value

Response

at line 714
updateFilePositionAction($parentType, $parentId, $objectType, $eventName)

Parameters

$parentType
$parentId
$objectType
$eventName

at line 759
updateImagePositionAction($parentType, $parentId)

Parameters

$parentType
$parentId

at line 766
updateDocumentPositionAction($parentType, $parentId)

Parameters

$parentType
$parentId

at line 773
toggleVisibilityFileAction($documentId, $parentType, $objectType, $eventName)

Parameters

$documentId
$parentType
$objectType
$eventName

at line 817
toggleVisibilityDocumentAction($parentType, $documentId)

Parameters

$parentType
$documentId

at line 822
toggleVisibilityImageAction($parentType, $documentId)

Parameters

$parentType
$documentId