| @@ 38-57 (lines=20) @@ | ||
| 35 | * @since 1.0 |
|
| 36 | * @ingroup Skins |
|
| 37 | */ |
|
| 38 | class NewtalkNotifier extends Component { |
|
| 39 | ||
| 40 | /** |
|
| 41 | * Builds the HTML code for this component |
|
| 42 | * |
|
| 43 | * @return String the HTML code |
|
| 44 | */ |
|
| 45 | public function getHtml() { |
|
| 46 | ||
| 47 | $data = $this->getSkinTemplate()->data; |
|
| 48 | ||
| 49 | if ( array_key_exists( 'newtalk', $data ) && $data[ 'newtalk' ] ) { |
|
| 50 | return $this->indent() . '<!-- message to a user about new messages on their talkpage -->' . |
|
| 51 | $this->indent() . '<span class="usermessage ' . $this->getClassString() . '">' . $this->getSkinTemplate()->data[ 'newtalk' ] . '</span>'; |
|
| 52 | } else { |
|
| 53 | return ''; |
|
| 54 | } |
|
| 55 | } |
|
| 56 | ||
| 57 | } |
|
| 58 | ||
| @@ 38-59 (lines=22) @@ | ||
| 35 | * @since 1.0 |
|
| 36 | * @ingroup Skins |
|
| 37 | */ |
|
| 38 | class SiteNotice extends Component { |
|
| 39 | ||
| 40 | /** |
|
| 41 | * Builds the HTML code for this component |
|
| 42 | * |
|
| 43 | * @return String the HTML code |
|
| 44 | */ |
|
| 45 | public function getHtml() { |
|
| 46 | ||
| 47 | $data = $this->getSkinTemplate()->data; |
|
| 48 | ||
| 49 | if ( array_key_exists( 'sitenotice', $data ) && $data[ 'sitenotice' ] ) { |
|
| 50 | ||
| 51 | return $this->indent() . '<!-- sitenotice -->' . |
|
| 52 | $this->indent() . '<div id="siteNotice" class="siteNotice ' . $this->getClassString() . '" >' . $data[ 'sitenotice' ] . '</div>' |
|
| 53 | . "\n"; |
|
| 54 | } else { |
|
| 55 | return "\n"; |
|
| 56 | } |
|
| 57 | } |
|
| 58 | ||
| 59 | } |
|
| 60 | ||