All Data Structures Functions Variables Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes
DetailsView Class Reference
Inheritance diagram for DetailsView:
ModelView ConfigurableMetadataView MetadataView View EditAndDetailsView EditView JobLogDetailsView ProductCategoryDetailsView ReportDetailsView SecuredDetailsView UserDetailsView WorkflowDetailsView

Public Member Functions

 __construct ($controllerId, $moduleId, $model, $title=null)
 
 getTitle ()
 
- Public Member Functions inherited from ModelView
 getModelClassName ()
 
- Public Member Functions inherited from View
 isUniqueToAPage ()
 
 render ()
 
 setCssClasses (array $classes)
 
 getCssClasses ()
 
 getTitle ()
 
 getPostTruncatedTitleContent ()
 

Static Public Member Functions

static assertModelIsValid ($model)
 
static getDefaultMetadata ()
 
static getDesignerRulesType ()
 

Protected Member Functions

 renderContent ()
 
 resolveLeftContentForSlidingPanels ($content)
 
 resolveAndRenderActionElementMenu ()
 
 renderRightSideContent ($form=null)
 
 renderBeforeFormLayoutForDetailsContent ()
 
 renderAfterFormLayoutForDetailsContent ()
 
 renderAfterRightSideContent ()
 
 renderAfterDetailsTable ()
 
 renderFormLayout ($form=null)
 
 resolveMetadataWithRenderedElements ($metadata, $maxCellsPerRow, $form)
 
 resolveMaxCellsPresentInAnyRow ($metadata)
 
 doesLabelHaveOwnCell ()
 
 afterResolveMetadataWithRenderedElements (&$metadataWithRenderedElements, $form)
 
 getMaxCellsPerRow ()
 
 getModel ()
 
 shouldDisplayCell ($detailViewOnly)
 
 shouldDisplayPanel ($detailViewOnly)
 
 resolveElementInformationDuringFormLayoutRender (&$elementInformation)
 
 resolveElementDuringFormLayoutRender (&$element)
 
 getFormLayoutMetadata ()
 
 getMorePanelsLinkLabel ()
 
 getLessPanelsLinkLabel ()
 
 alwaysShowErrorSummary ()
 
 getFormLayoutUniqueId ()
 
 getDetailsViewFormLayoutClass ()
 
- Protected Member Functions inherited from View
 resolveDefaultClasses ()
 
 renderContainerWrapperId ()
 
 getContainerWrapperTag ()
 
 getId ()
 
 renderContent ()
 
 getViewStyle ()
 
 renderTitleContent ()
 
 resolveCustomViewTemplateFileName ($theme, $view)
 

Static Protected Member Functions

static assertMetadataIsValid (array $metadata)
 
- Static Protected Member Functions inherited from ModelView
static assertMetadataIsValid (array $metadata)
 

Protected Attributes

 $controllerId
 
 $moduleId
 
 $model
 
 $title
 
- Protected Attributes inherited from ModelView
 $modelClassName
 
- Protected Attributes inherited from View
 $cssClasses = array()
 
 $title
 
 $makeDefaultClassesFromClassHeirarchy = true
 

Detailed Description

The base View for a module's details view.

Definition at line 40 of file DetailsView.php.

Constructor & Destructor Documentation

__construct (   $controllerId,
  $moduleId,
  $model,
  $title = null 
)

Constructs a detail view specifying the controller as well as the model that will have its details displayed.

Definition at line 54 of file DetailsView.php.

Member Function Documentation

renderContent ( )
protected

Renders content for a view including a layout title, form toolbar, and form layout.

Returns
A string containing the element's content.

Definition at line 76 of file DetailsView.php.

resolveLeftContentForSlidingPanels (   $content)
protected

Override to adding sliding panel support.

See Also
ContactDetailsPortletView for an example.
Parameters
$content
Returns
mixed

Definition at line 98 of file DetailsView.php.

renderFormLayout (   $form = null)
protected

Render a form layout.

Parameters
$formIf the layout is editable, then pass a $form otherwise it can be null.
Returns
A string containing the element's content.

Definition at line 134 of file DetailsView.php.

resolveMetadataWithRenderedElements (   $metadata,
  $maxCellsPerRow,
  $form 
)
protected

Given metadata, resolve the element information into the rendered element content and return the metadata with rendered element content instead of element information.

Parameters
array$metadata
integer$maxCellsPerRow
object$formZurmoActiveForm or null

Definition at line 166 of file DetailsView.php.

resolveMaxCellsPresentInAnyRow (   $metadata)
protected

Given an array of metadata, resolve what the maximum amount of cells present are in any given row.

Parameters
array$metadata

Definition at line 222 of file DetailsView.php.

doesLabelHaveOwnCell ( )
protected
Returns
true if the label has its own TD next to the TD of the input. Override if the label is on top of the input, in which case it does not need its own cell.

Definition at line 252 of file DetailsView.php.

afterResolveMetadataWithRenderedElements ( $metadataWithRenderedElements,
  $form 
)
protected

Override if you need to do any special processing of the metadata array prior to it being rendered.

Parameters
array$metadataWithRenderedElements

Definition at line 261 of file DetailsView.php.

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'),
),
),
)
),
),
),
),
);
?>
*

Definition at line 333 of file DetailsView.php.

getModel ( )
protected

Return the model that will have its details displayed.

Definition at line 341 of file DetailsView.php.

resolveElementInformationDuringFormLayoutRender ( $elementInformation)
protected

Override sub-class if you need to add anything to the ElementInformation as you are parsing the form layout

Definition at line 365 of file DetailsView.php.

resolveElementDuringFormLayoutRender ( $element)
protected

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

Definition at line 372 of file DetailsView.php.

getFormLayoutMetadata ( )
protected

Gets the metadata for this view. Override if you need to make the metadata dynamically or change the way the metadata is retreived

Returns
array view metadata

Definition at line 383 of file DetailsView.php.

getMorePanelsLinkLabel ( )
protected

For the given view, return the label used when a link is displayed to show additional panels in the view.

Returns
string label.

Definition at line 400 of file DetailsView.php.

getLessPanelsLinkLabel ( )
protected

For the given view, return the label used when a link is displayed to show less panels in the view.

Returns
string label.

Definition at line 409 of file DetailsView.php.

getFormLayoutUniqueId ( )
protected

Gets form layout unique id

Returns
null

Definition at line 428 of file DetailsView.php.

getDetailsViewFormLayoutClass ( )
protected

Gets details view form layout class name.

Returns
string

Definition at line 437 of file DetailsView.php.


The documentation for this class was generated from the following file:
Generated on Mon Jan 27 2020 07:10:36