+ /**
+ * Renderer for getFooterIcons and getFooterLinks
+ *
+ * @param string $iconStyle $option for getFooterIcons: "icononly", "nocopyright"
+ * @param string $linkStyle $option for getFooterLinks: "flat"
+ *
+ * @return string html
+ * @since 1.29
+ */
+ protected function getFooter( $iconStyle = 'icononly', $linkStyle = 'flat' ) {
+ $validFooterIcons = $this->getFooterIcons( $iconStyle );
+ $validFooterLinks = $this->getFooterLinks( $linkStyle );
+
+ $html = '';
+
+ if ( count( $validFooterIcons ) + count( $validFooterLinks ) > 0 ) {
+ $html .= Html::openElement( 'div', [
+ 'id' => 'footer-bottom',
+ 'role' => 'contentinfo',
+ 'lang' => $this->get( 'userlang' ),
+ 'dir' => $this->get( 'dir' )
+ ] );
+ $footerEnd = Html::closeElement( 'div' );
+ } else {
+ $footerEnd = '';
+ }
+ foreach ( $validFooterIcons as $blockName => $footerIcons ) {
+ $html .= Html::openElement( 'div', [
+ 'id' => Sanitizer::escapeIdForAttribute( "f-{$blockName}ico" ),
+ 'class' => 'footer-icons'
+ ] );
+ foreach ( $footerIcons as $icon ) {
+ $html .= $this->getSkin()->makeFooterIcon( $icon );
+ }
+ $html .= Html::closeElement( 'div' );
+ }
+ if ( count( $validFooterLinks ) > 0 ) {
+ $html .= Html::openElement( 'ul', [ 'id' => 'f-list', 'class' => 'footer-places' ] );
+ foreach ( $validFooterLinks as $aLink ) {
+ $html .= Html::rawElement(
+ 'li',
+ [ 'id' => Sanitizer::escapeIdForAttribute( $aLink ) ],
+ $this->get( $aLink )
+ );
+ }
+ $html .= Html::closeElement( 'ul' );
+ }
+
+ $html .= $this->getClear() . $footerEnd;
+
+ return $html;
+ }
+
+ /**
+ * Get a div with the core visualClear class, for clearing floats
+ *
+ * @return string html
+ * @since 1.29
+ */
+ protected function getClear() {
+ return Html::element( 'div', [ 'class' => 'visualClear' ] );
+ }
+