* @return string[]
* @since 3.2
*/
- public static function getAllDiscussionProviders(): array {
+ public static function getAllDiscussionProviders() {
/** @var string[] $discussionProviders */
static $discussionProviders;
* @return Package
* @since 3.2
*/
- public function getPackage(): Package {
+ public function getPackage() {
return PackageCache::getInstance()->getPackage($this->packageID);
}
}
* @return bool
* @since 3.2
*/
- public function showShareButtons(): bool {
+ public function showShareButtons() {
return $this->enableShareButtons && $this->pageType !== 'system';
}
*
* @return string
*/
- public function getCustomSearchResultIcon(): string;
+ public function getCustomSearchResultIcon();
}
/**
* @inheritDoc
*/
- public function getDiscussionCount(): int {
+ public function getDiscussionCount() {
return $this->article->comments;
}
/**
* @inheritDoc
*/
- public function getDiscussionCountPhrase(): string {
+ public function getDiscussionCountPhrase() {
return WCF::getLanguage()->getDynamicVariable('wcf.article.articleComments', ['article' => $this->article]);
}
/**
* @inheritDoc
*/
- public function renderDiscussions(): string {
+ public function renderDiscussions() {
$commentCanAdd = WCF::getSession()->getPermission('user.article.canAddComment');
$commentObjectTypeID = CommentHandler::getInstance()->getObjectTypeID('com.woltlab.wcf.articleComment');
$commentManager = CommentHandler::getInstance()->getObjectType($commentObjectTypeID)->getProcessor();
/**
* @inheritDoc
*/
- public static function isResponsible(Article $article): bool {
+ public static function isResponsible(Article $article) {
return !!$article->enableComments;
}
}
*
* @return int
*/
- public function getDiscussionCount(): int;
+ public function getDiscussionCount();
/**
* Returns the simple phrase "X <discussions>" that is used for both the statistics
*
* @return string
*/
- public function getDiscussionCountPhrase(): string;
+ public function getDiscussionCountPhrase();
/**
* Renders the input and display section of the associated discussion.
*
* @return string
*/
- public function renderDiscussions(): string;
+ public function renderDiscussions();
/**
* Sets the content object required for the separate discussions per article language.
* @param Article $article
* @return bool
*/
- public static function isResponsible(Article $article): bool;
+ public static function isResponsible(Article $article);
}
/**
* @inheritDoc
*/
- public function getDiscussionCount(): int {
+ public function getDiscussionCount() {
return 0;
}
/**
* @inheritDoc
*/
- public function getDiscussionCountPhrase(): string {
+ public function getDiscussionCountPhrase() {
return '';
}
/**
* @inheritDoc
*/
- public function renderDiscussions(): string {
+ public function renderDiscussions() {
return '';
}
/**
* @inheritDoc
*/
- public static function isResponsible(Article $article): bool {
+ public static function isResponsible(Article $article) {
return true;
}
}
* @param string $idPrefix prefix for all generated ids, must not end with a delimiter
* @return string the HTML of the generated table of contents or an empty string if there are too few headings
*/
- public static function forMessage(\DOMDocument $document, string $idPrefix): string {
+ public static function forMessage(\DOMDocument $document, string $idPrefix) {
$titleRegex = new Regex('[^\p{L}\p{N}]+', Regex::UTF_8);
// fetch all headings in their order of appearance
$this->title = $title;
}
- public function getID(): string {
+ public function getID() {
return $this->id;
}
- public function getLevel(): int {
+ public function getLevel() {
return $this->level;
}
- public function getTitle(): string {
+ public function getTitle() {
return $this->title;
}
$this->depth = $depth;
}
- public function getDepth(): int {
+ public function getDepth() {
return $this->depth;
}
*
* @return integer
*/
- public function count(): int {
+ public function count() {
return count($this->children);
}
*
* @return bool
*/
- public function isLastSibling(): bool {
+ public function isLastSibling() {
foreach ($this->getParent() as $key => $child) {
if ($child === $this) {
return ($key === count($this->getParent()) - 1);
*
* @return int
*/
- public function getOpenParentNodes(): int {
+ public function getOpenParentNodes() {
$element = $this;
$i = 0;
/**
* @inheritDoc
*/
- public function valid(): bool {
+ public function valid() {
return isset($this->children[$this->position]);
}
/**
* @inheritDoc
*/
- public function current(): HtmlTocItem {
+ public function current() {
return $this->children[$this->position];
}
/**
* @inheritDoc
*/
- public function key(): int {
+ public function key() {
return $this->position;
}
/**
* @inheritDoc
*/
- public function getChildren(): HtmlTocItem {
+ public function getChildren() {
return $this->children[$this->position];
}
/**
* @inheritDoc
*/
- public function hasChildren(): bool {
+ public function hasChildren() {
return count($this->children) > 0;
}
- public function getIterator(): \RecursiveIteratorIterator {
+ public function getIterator() {
return new \RecursiveIteratorIterator($this, \RecursiveIteratorIterator::SELF_FIRST);
}
}
*
* @return string[]
*/
- public function getAvailableActions(): array;
+ public function getAvailableActions();
/**
* Processes a list of items by converting them into IViewableModificationLog
* @param ModificationLog[] $items
* @return IViewableModificationLog[]
*/
- public function processItems(array $items): array;
+ public function processItems(array $items);
}