CampaignEditView Class Reference

Inheritance diagram for CampaignEditView:
SecuredEditView EditView DetailsView ModelView ConfigurableMetadataView MetadataView View

Static Public Member Functions

static getDefaultMetadata ()

Protected Member Functions

 renderContent ()
 renderAfterFormLayout ($form)
 renderHtmlAndTextContentElement ($model, $attribute, $form)
 renderMergeTagsContent ()
 resolveElementInformationDuringFormLayoutRender (&$elementInformation)
 resolveElementDuringFormLayoutRender (&$element)
 alwaysShowErrorSummary ()
 getNewModelTitleLabel ()
 registerCopyInfoFromMarketingListScript ()
 registerRedactorHeightScript ()
 isCampaignEditable ()
 renderLabelForSaveButton ()
 resolveHtmlOptionsForSaveButton ()
 renderRightSideFormLayoutForEdit ($form)
 registerSendTestEmailScriptsForEditView ()

Detailed Description

Definition at line 37 of file CampaignEditView.php.


Member Function Documentation

static getDefaultMetadata (  )  [static]

Returns meta data for use in automatically generating the view. The meta data is comprised of panels, rows, and then cells. Each cell can have 1 or more elements.

The element takes 3 parameters. The first parameter is 'attributeName'. The second parameter is 'type' and refers to the element type. Using a type of 'Text' would utilize the TextElement class. The third parameter is 'wide' and refers to how many cells the field should span. An example of the 'wide' => true usage would be for a text description field. Here is an example meta data that defines a 2 row x 2 cell layout.

            <?php
                $metadata = array(
                    'panels' => array(
                        array(
                            'rows' => array(
                                array('cells' =>
                                    array(
                                        array(
                                            'elements' => array(
                                                array('field' => 'name', 'type' => 'Text'),
                                            ),
                                        ),
                                        array(
                                            'elements' => array(
                                                array('field' => 'officePhone', 'type' => 'Text'),
                                            ),
                                        ),
                                    )
                                ),
                                array('cells' =>
                                    array(
                                        array(
                                            'elements' => array(
                                                array('field' => 'industry', 'type' => 'DropDown'),
                                            ),
                                        ),
                                        array(
                                            'elements' => array(
                                                array('field' => 'officeFax', 'type' => 'Text'),
                                            ),
                                        ),
                                    )
                                ),
                            ),
                        ),
                    ),
                );
            ?>

Reimplemented from DetailsView.

Definition at line 39 of file CampaignEditView.php.

renderContent (  )  [protected]

Override of parent function. Makes use of the ZurmoActiveForm widget to provide an editable form.

Returns:
A string containing the element's content.

Reimplemented from EditView.

Definition at line 155 of file CampaignEditView.php.

resolveElementInformationDuringFormLayoutRender ( &$  elementInformation  )  [protected]

Override to mark disable elements for campaign edit

Reimplemented from SecuredEditView.

Definition at line 204 of file CampaignEditView.php.

resolveElementDuringFormLayoutRender ( &$  element  )  [protected]

Override sub-class if you need to set anything into the element object.

Reimplemented from DetailsView.

Definition at line 212 of file CampaignEditView.php.

resolveHtmlOptionsForSaveButton (  )  [protected]

Show save button only for active campaigns, otherwise Campaign saving would cause error because required fields are disabled

Returns:
array|null

Definition at line 292 of file CampaignEditView.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Sat Jul 20 07:11:03 2019