/** * Apply the show dates settings. * * @param SiteComponent $siteComponent * @return void * @access public * @since 3/21/08 */ public function applyShowDates(SiteComponent $siteComponent) { if (RequestContext::value('showDates') && RequestContext::value('showDates') !== $siteComponent->showDatesSetting()) { $siteComponent->updateShowDatesSetting(RequestContext::value('showDates')); } }
/** * 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')); } }