/** * Apply the content sorting method. * * @param SiteComponent $siteComponent * @return void * @access public * @since 1/10/08 */ public function applySortMethod(SiteComponent $siteComponent) { if (RequestContext::value('sortMethod') && RequestContext::value('sortMethod') !== $siteComponent->sortMethodSetting()) { $siteComponent->updateSortMethodSetting(RequestContext::value('sortMethod')); } }
/** * Apply common properties a siteComponent * * @param object SiteComponent $siteComponent * @param object DOMElement $element * @return void * @access protected * @since 1/22/08 */ protected function applyCommonProperties(SiteComponent $siteComponent, DOMElement $element) { if ($element->hasAttribute('showDisplayNames')) { $siteComponent->updateShowDisplayNames($element->getAttribute('showDisplayNames')); } if ($element->hasAttribute('showHistory')) { $siteComponent->updateShowHistorySetting($element->getAttribute('showHistory')); } if ($element->hasAttribute('showDates')) { $siteComponent->updateShowDatesSetting($element->getAttribute('showDates')); } if ($element->hasAttribute('showAttribution')) { $siteComponent->updateShowAttributionSetting($element->getAttribute('showAttribution')); } if ($element->hasAttribute('sortMethod')) { $siteComponent->updateSortMethodSetting($element->getAttribute('sortMethod')); } if ($element->hasAttribute('commentsEnabled')) { $siteComponent->updateCommentsEnabled($element->getAttribute('commentsEnabled')); } if ($element->hasAttribute('width')) { $siteComponent->updateWidth($element->getAttribute('width')); } if ($element->hasAttribute('showDates')) { $siteComponent->updateShowDatesSetting($element->getAttribute('showDates')); } if ($element->hasAttribute('showAttribution')) { $siteComponent->updateShowAttributionSetting($element->getAttribute('showAttribution')); } }