summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@webtrees.net>2019-01-29 22:50:37 +0000
committerGreg Roach <fisharebest@webtrees.net>2019-01-29 22:50:47 +0000
commitef46a58b349d35465be41398591b466c8962950a (patch)
treea6d072626743b96e4668c70316c72d432d5b0ebb
parentc30fa4baed0aa3354783443e07938cb289f75afd (diff)
downloadwebtrees-ef46a58b349d35465be41398591b466c8962950a.tar.gz
webtrees-ef46a58b349d35465be41398591b466c8962950a.tar.bz2
webtrees-ef46a58b349d35465be41398591b466c8962950a.zip
DeadCode
-rw-r--r--app/Theme/AbstractTheme.php128
1 files changed, 0 insertions, 128 deletions
diff --git a/app/Theme/AbstractTheme.php b/app/Theme/AbstractTheme.php
index aea3c29d3b..c9c4d178fc 100644
--- a/app/Theme/AbstractTheme.php
+++ b/app/Theme/AbstractTheme.php
@@ -64,32 +64,6 @@ abstract class AbstractTheme
protected $tree;
/**
- * Custom themes should place their initialization code in the function hookAfterInit(), not in
- * the constructor, as all themes get constructed - whether they are used or not.
- */
- final public function __construct()
- {
- }
-
- /**
- * Create accessibility links for the header.
- * "Skip to content" allows keyboard only users to navigate over the headers without
- * pressing TAB many times.
- *
- * @return string
- */
- public function accessibilityLinks(): string
- {
- return
- '<div class="wt-accessibility-links">' .
- '<a class="sr-only sr-only-focusable btn btn-info btn-sm" href="#content">' .
- /* I18N: Skip over the headers and menus, to the main content of the page */
- I18N::translate('Skip to content') .
- '</a>' .
- '</div>';
- }
-
- /**
* Where are our CSS, JS and other assets?
*
* @deprecated - use the constant directly
@@ -101,55 +75,6 @@ abstract class AbstractTheme
}
/**
- * Add markup to a flash message.
- *
- * @param stdClass $message
- *
- * @return string
- */
- protected function flashMessageContainer(stdClass $message): string
- {
- return $this->htmlAlert($message->text, $message->status, true);
- }
-
- /**
- * Create a container for messages that are "flashed" to the session
- * on one request, and displayed on another. If there are many messages,
- * the container may need a max-height and scroll-bar.
- *
- * @param stdClass[] $messages
- *
- * @return string
- */
- protected function flashMessagesContainer(array $messages)
- {
- $html = '';
- foreach ($messages as $message) {
- $html .= $this->flashMessageContainer($message);
- }
-
- if ($html) {
- return '<div class="flash-messages">' . $html . '</div>';
- }
-
- return '';
- }
-
- /**
- * Create a pending changes link for the page footer.
- *
- * @return string
- */
- public function formatPendingChangesLink()
- {
- if ($this->pendingChangesExist()) {
- return '<div class="pending-changes-link">' . $this->pendingChangesLink() . '</div>';
- }
-
- return '';
- }
-
- /**
* Add markup to the secondary menu.
*
* @return string
@@ -187,33 +112,6 @@ abstract class AbstractTheme
}
/**
- * Add HTML markup to create an alert
- *
- * @param string $html The content of the alert
- * @param string $level One of 'success', 'info', 'warning', 'danger'
- * @param bool $dismissible If true, add a close button.
- *
- * @return string
- */
- public function htmlAlert($html, $level, $dismissible)
- {
- if ($dismissible) {
- return
- '<div class="alert alert-' . $level . ' alert-dismissible" role="alert">' .
- '<button type="button" class="close" data-dismiss="alert" aria-label="' . I18N::translate('close') . '">' .
- '<span aria-hidden="true">&times;</span>' .
- '</button>' .
- $html .
- '</div>';
- }
-
- return
- '<div class="alert alert-' . $level . '" role="alert">' .
- $html .
- '</div>';
- }
-
- /**
* Display an icon for this fact.
*
* @param Fact $fact
@@ -938,20 +836,6 @@ abstract class AbstractTheme
}
/**
- * Format the secondary menu.
- *
- * @param Menu[] $menus
- *
- * @return string
- */
- public function secondaryMenuContent(array $menus): string
- {
- return implode('', array_map(function (Menu $menu): string {
- return $menu->bootstrap4();
- }, $menus));
- }
-
- /**
* A list of CSS files to include for this page.
*
* @return string[]
@@ -979,16 +863,4 @@ abstract class AbstractTheme
* @return string
*/
abstract public function themeName(): string;
-
- /**
- * Create the <title> tag.
- *
- * @param string $title
- *
- * @return string
- */
- protected function title($title): string
- {
- return '<title>' . e($title) . '</title>';
- }
}