Account Suspended
Account Suspended
This Account has been suspended.
Contact your hosting provider for more information.
 All Data Structures Functions Variables Pages
Public Member Functions | Static Public Member Functions | Data Fields | Protected Member Functions | Protected Attributes | Static Protected Attributes
ModelElement Class Reference
Inheritance diagram for ModelElement:
Element ElementActionTypeInterface AccountElement AuditEventElement ContactElement EmailTemplateElement GroupElement MarketingListElement NameIdElement OpportunityElement ProductCategoryElement ProductElement ProductTemplateElement ProjectElement ProjectForTaskElement ReadOnlyModelElement RoleElement UserElement

Public Member Functions

 doNotHideSelectLinkWhenDisabled ()
 
 setIdAttributeId ($idAttributeId)
 
 getEditableNameIds ()
 
- Public Member Functions inherited from Element
 __construct ($model, $attribute, $form=null, array $params=array())
 
 render ()
 
 getEditableNameIds ()
 
 getAttribute ()
 
 renderAsControlNonEditable ()
 

Static Public Member Functions

static getModuleId ()
 
static getEditableActionType ()
 
static getNonEditableActionType ()
 
- Static Public Member Functions inherited from Element
static getDisplayName ()
 
static isReadOnly ()
 
static resolveInputNameForEditableInput ($attributeName)
 
static resolveInputNamePrefixIntoString ($inputNamePrefix)
 
static resolveInputIdPrefixIntoString ($inputIdPrefix)
 

Data Fields

const MODAL_CONTAINER_PREFIX = 'modalContainer'
 
const CLEAR_LINK_ID = 'clear-link'
 
- Data Fields inherited from Element
 $params
 
 $editableTemplate = '<th>{label}</th><td colspan="{colspan}">{content}{error}</td>'
 
 $nonEditableTemplate = '<th>{label}</th><td colspan="{colspan}">{content}</td>'
 

Protected Member Functions

 renderControlEditable ()
 
 renderEditableContent ()
 
 wrapHasModelSelectInput (&$content)
 
 getIdInputHtmlOptions ()
 
 renderTextField ($idInputName)
 
 resolveAdditionalHtmlOptionsForTextField ($idInputName)
 
 getAutoCompleteUrlParams ()
 
 getAutoCompleteControllerId ()
 
 renderSelectLink ()
 
 getSelectLinkUrlParams ()
 
 resolveAjaxOptionsForSelectingModel ($formId)
 
 getModalTitleForSelectingModel ()
 
 getModalContainerId ()
 
 getSelectLinkControllerId ()
 
 renderControlNonEditable ()
 
 makeNonEditableLink ()
 
 makeNonEditableLinkUrl ()
 
 renderLabel ()
 
 getIdForHiddenField ()
 
 getNameForHiddenField ()
 
 getIdForTextField ()
 
 getNameForTextField ()
 
 getIdForSelectLink ()
 
 getName ()
 
 getId ()
 
 getResolvedModel ()
 
 getModalTransferInformation ()
 
 resolveSourceModelIdForModalTransferInformation ()
 
 getSelectLinkStartingStyle ()
 
 showLinkOnNonEditable ()
 
 showOnlyHiddenInputForEditable ()
 
 resolveModuleId ()
 
 registerScriptForAutoCompleteTextField ()
 
 getOnSelectOptionForAutoComplete ($idInputName)
 
 resolveOnSelectionOptionAttributeNameForAutoComplete ()
 
 renderExtraHtmlContent ()
 
 renderClearLink ()
 
 renderClearLinkContent ()
 
 resolveClearLinkHtmlOptions ()
 
 registerClearLinkScripts ()
 
 registerIdHiddenInputChangeScript ()
 
 registerClearLinkClickScript ()
 
- Protected Member Functions inherited from Element
 renderLabel ()
 
 resolveIdForLabel ()
 
 getFormattedAttributeLabel ()
 
 resolveNonActiveFormFormattedLabel ($label)
 
 renderError ()
 
 renderScopedErrorId ($inputNameIdPrefix, $attribute)
 
 renderEditable ()
 
 renderNonEditable ()
 
 renderControlEditable ()
 
 renderControlNonEditable ()
 
 getColumnSpan ()
 
 getDisabledValue ()
 
 getHtmlOptions ()
 
 resolveContentTemplate ($template, $data)
 
 getEditableInputId ($attributeName=null, $relationAttributeName=null)
 
 getEditableInputName ($attributeName=null, $relationAttributeName=null)
 
 resolveInputPrefix ()
 
 resolveInputIdPrefix ()
 
 resolveInputNamePrefix ()
 
 getListViewGridId ()
 

Protected Attributes

 $controllerId = 'default'
 
 $idAttributeId = 'id'
 
 $hideSelectLinkWhenDisabled = true
 
- Protected Attributes inherited from Element
 $model
 
 $attribute
 
 $form
 

Static Protected Attributes

static $moduleId
 
static $autoCompleteActionId = 'autoComplete'
 
static $modalActionId = 'modalList'
 
static $editableActionType = 'ModalList'
 
static $nonEditableActionType = 'Details'
 

Detailed Description

Display the model selection. This is a combination of a type-ahead input text field and a selection button which renders a modal list view to search on whichever model element extends this class. Also includes a hidden input for the model id.

Definition at line 44 of file ModelElement.php.

Member Function Documentation

renderEditableContent ( )
protected

Render a hidden input, a text input with an auto-complete event, and a select button. These three items together form the Model Editable Element

Returns
The element's content as a string.

Definition at line 113 of file ModelElement.php.

renderTextField (   $idInputName)
protected

Render a auto-complete text input field. When the field is typed in, it will trigger ajax call to look up against the Model's name

Returns
The element's content as a string.

Definition at line 157 of file ModelElement.php.

resolveAdditionalHtmlOptionsForTextField (   $idInputName)
protected

Override in children class if you need additional html options here.

Definition at line 226 of file ModelElement.php.

renderSelectLink ( )
protected

Render a select link. This link calls a modal popup.

Returns
The element's content as a string.

Definition at line 246 of file ModelElement.php.

renderControlNonEditable ( )
protected

Renders the attribute from the model.

Returns
The element's content.

Definition at line 298 of file ModelElement.php.

renderLabel ( )
protected

Override to support the module labels for the models.

Definition at line 329 of file ModelElement.php.

getEditableNameIds ( )

Get the collection of id/names of inputs and other parts of the element.

Definition at line 368 of file ModelElement.php.

getName ( )
protected
Returns
stringified name if it exists or empty string to avoid (unnamed) being shown.

Definition at line 381 of file ModelElement.php.

getId ( )
protected
Returns
id if a real model, otherwise an empty string to ensure the
See Also
ZurmoHtml::activeInputField works properly when resolving the id.

Definition at line 394 of file ModelElement.php.

getResolvedModel ( )
protected

In the case of attributes that are related, the attribute is returned, because that is a related model.

Definition at line 407 of file ModelElement.php.

getModalTransferInformation ( )
protected
Returns
array

Definition at line 415 of file ModelElement.php.

showLinkOnNonEditable ( )
protected

Determines if a link should be shown

Definition at line 444 of file ModelElement.php.

showOnlyHiddenInputForEditable ( )
protected

Determines if the editable content should only include the hidden input. This is utilized if there is a security edge case that needs to be gracefully handled.

Definition at line 457 of file ModelElement.php.

resolveModuleId ( )
protected

Gets the moduleId statically. You can override this method and get the moduleId in a non-static way since this method is called non-statically.

Definition at line 470 of file ModelElement.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 485 of file ModelElement.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 494 of file ModelElement.php.

registerScriptForAutoCompleteTextField ( )
protected

Registers scripts for autocomplete text field

Definition at line 502 of file ModelElement.php.

getOnSelectOptionForAutoComplete (   $idInputName)
protected

Gets on select option for the automcomplete text field

Parameters
string$idInputName
Returns
string

Definition at line 525 of file ModelElement.php.

renderExtraHtmlContent ( )
protected

Renders extra html content

Returns
null

Definition at line 539 of file ModelElement.php.

Field Documentation

$moduleId
staticprotected

Override in child element with a specific moduleId

Definition at line 53 of file ModelElement.php.

$controllerId = 'default'
protected

Override in child element with a custom controllerId if needed

Definition at line 59 of file ModelElement.php.

$idAttributeId = 'id'
protected

Model or form's attributeName for the model 'id'

Definition at line 64 of file ModelElement.php.

$autoCompleteActionId = 'autoComplete'
staticprotected

The auto complete search action id

Definition at line 69 of file ModelElement.php.

$modalActionId = 'modalList'
staticprotected

The modal popup's action id

Definition at line 74 of file ModelElement.php.

$editableActionType = 'ModalList'
staticprotected

The action type of the related model for which the autocomplete/select popup are calling.

Definition at line 80 of file ModelElement.php.

$nonEditableActionType = 'Details'
staticprotected

The action type of the related model for which the details link is calling.

Definition at line 86 of file ModelElement.php.


The documentation for this class was generated from the following file:
Generated on Fri Aug 7 2020 07:10:53
Account Suspended
Account Suspended
This Account has been suspended.
Contact your hosting provider for more information.