FilesElement Class Reference

Inheritance diagram for FilesElement:
ModelsElement DerivedElementInterface ElementActionTypeInterface Element

Public Member Functions

 getAllowDownloadOnEditable ()
 getAllowDownloadOnEditableDefault ()

Static Public Member Functions

static getDisplayName ()
static getModelAttributeNames ()
static getEditableActionType ()
static getNonEditableActionType ()
static getEditableTemplateForInlineEdit ()

Data Fields

const ALLOW_DOWNLOAD_ON_EDITABLE_KEY = 'allowDownloadOnEditable'

Protected Member Functions

 renderControlNonEditable ()
 renderControlEditable ()
 renderError ()
 renderLabel ()
 getFormattedAttributeLabel ()
 getShowMaxSize ()
 getId ()
 getElementIdPostfix ()
 getElementModeIdForElementId ()

Protected Attributes

 $elementIdPostfix = ''

Detailed Description

User interface element for managing file attachments against a given model.

Definition at line 41 of file FilesElement.php.


Member Function Documentation

renderError (  )  [protected]

Generate the error content. Used by editable content

Returns:
error content

Reimplemented from Element.

Definition at line 113 of file FilesElement.php.

renderLabel (  )  [protected]

Generate the element label content

Returns:
A string containing the element's label

Reimplemented from Element.

Definition at line 117 of file FilesElement.php.

static getModelAttributeNames (  )  [static]

Get the attributeNames of attributes used in the derived element. For this element, there are no attributes from the model.

Returns:
array - empty

Implements DerivedElementInterface.

Definition at line 137 of file FilesElement.php.

static getEditableActionType (  )  [static]

Gets the action type for the related model's action that is called by the select button or the autocomplete feature in the Editable render.

Implements ElementActionTypeInterface.

Definition at line 147 of file FilesElement.php.

static getNonEditableActionType (  )  [static]

Gets the action type for the related model's action that is called by the link in the nonEditable render.

Implements ElementActionTypeInterface.

Definition at line 152 of file FilesElement.php.

static getEditableTemplateForInlineEdit (  )  [static]
Returns:
string content

Definition at line 174 of file FilesElement.php.

getElementIdPostfix (  )  [protected]

Add ElementId Postfix, which is used to distinct file uploads elements by their ids For now this feature is usefull only for comments.

Returns:
string

Definition at line 203 of file FilesElement.php.

getElementModeIdForElementId (  )  [protected]

Used now only for comments, because in case when we have multiple comments on same page, and because user can edit comments(and remove files from comments), we need to provide unique id for each comment.

Returns:
model id or null

Definition at line 217 of file FilesElement.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Sat Aug 24 07:10:56 2019