public function get() { $_aSectionPath = explode('|', $this->sSectionPath); $_aSectionset = $this->uniteArrays(array('_fields_type' => $this->sStructureType, '_structure_type' => $this->sStructureType, '_section_path' => $this->sSectionPath, '_section_path_array' => $_aSectionPath, '_nested_depth' => count($_aSectionPath) - 1) + $this->aSectionset + array('capability' => $this->sCapability), self::$aStructure); $_aSectionset['order'] = $this->getAOrB(is_numeric($_aSectionset['order']), $_aSectionset['order'], $this->iCountOfElements + 10); $_oCollapsibleArgumentFormatter = new AdminPageFramework_Form_Model___Format_CollapsibleSection($_aSectionset['collapsible'], $_aSectionset['title']); $_aSectionset['collapsible'] = $_oCollapsibleArgumentFormatter->get(); $_aSectionset['class'] = $this->getAsArray($_aSectionset['class']); $_aSectionset['_caller_object'] = $this->oCaller; return $_aSectionset; }
private function _getCaption(array $aSectionset, $iSectionIndex, $aFieldsets, $aFieldErrors, $aFieldTypeDefinitions, $aCallbacks, $oMsg) { if (!$aSectionset['description'] && !$aSectionset['title']) { return "<caption class='admin-page-framework-section-caption' style='display:none;'></caption>"; } $_oArgumentFormater = new AdminPageFramework_Form_Model___Format_CollapsibleSection($aSectionset['collapsible'], $aSectionset['title'], $aSectionset); $_abCollapsible = $_oArgumentFormater->get(); $_oCollapsibleSectionTitle = new AdminPageFramework_Form_View___CollapsibleSectionTitle(array('title' => $this->getElement($_abCollapsible, 'title', $aSectionset['title']), 'tag' => 'h3', 'section_index' => $iSectionIndex, 'collapsible' => $_abCollapsible, 'container_type' => 'section', 'sectionset' => $aSectionset), $aFieldsets, $this->aSavedData, $this->aFieldErrors, $aFieldTypeDefinitions, $oMsg, $aCallbacks); $_bShowTitle = empty($_abCollapsible) && !$aSectionset['section_tab_slug']; return "<caption " . $this->getAttributes(array('class' => 'admin-page-framework-section-caption', 'data-section_tab' => $aSectionset['section_tab_slug'])) . ">" . $_oCollapsibleSectionTitle->get() . $this->getAOrB($_bShowTitle, $this->_getCaptionTitle($aSectionset, $iSectionIndex, $aFieldsets, $aFieldTypeDefinitions), '') . $this->_getCaptionDescription($aSectionset, $aCallbacks['section_head_output']) . $this->_getSectionError($aSectionset, $aFieldErrors) . "</caption>"; }
private function _getCollapsibleArgumentForSections(array $aSectionset = array()) { $_oArgumentFormater = new AdminPageFramework_Form_Model___Format_CollapsibleSection($aSectionset['collapsible'], $aSectionset['title'], $aSectionset); $_aCollapsible = $this->getAsArray($_oArgumentFormater->get()); return isset($_aCollapsible['container']) && 'sections' === $_aCollapsible['container'] ? $_aCollapsible : array(); }