public function __construct(Text $text, InstalledWidgets $installedWidgets, PlacedWidget $editWidget, RequestToken $requestToken) { parent::__construct($text); $this->installedWidgets = $installedWidgets; $this->editWidget = $editWidget; $this->requestToken = $requestToken; }
public function __construct(Text $text, DateTime $year, array $articlesInYear, $createLinks) { parent::__construct($text); $this->year = $year; $this->articlesInYear = $articlesInYear; $this->createLinks = (bool) $createLinks; }
public function __construct(Text $text, InstalledWidgets $installedWidgets, PlacedWidget $placedWidget, Link $link) { parent::__construct($text); $this->installedWidgets = $installedWidgets; $this->placedWidget = $placedWidget; $this->link = $link; }
public function __construct(Text $text, array $links, $editLinks = false, $openInNewWindow = false) { parent::__construct($text); $this->links = $links; $this->editLinks = (bool) $editLinks; $this->openInNewWindow = (bool) $openInNewWindow; }
/** * Constructs a new menu search view. * @param Text $text The website object. * @param RequestToken $requestToken Token for in the form. * @param Menu[] $menus All menus on the website. * @param Menu|null $menu The menu the links are in. */ public function __construct(Text $text, RequestToken $requestToken, array $menus, Menu $menu = null) { parent::__construct($text); $this->requestToken = $requestToken; $this->menus = $menus; $this->menu = $menu; }
/** * Creates a new view to edit all links. * @param Text $text The text object. * @param Link[][] $allLinks A map of menuId => Link[]. * @param Menu[] $allMenus A map of menuId => Menu */ public function __construct(Text $text, RequestToken $requestToken, array $allLinks, array $allMenus) { parent::__construct($text); $this->requestToken = $requestToken; $this->allLinks = $allLinks; $this->allMenus = $allMenus; }
public function __construct(Text $text, RequestToken $token, Comment $comment) { parent::__construct($text); $this->requestToken = $token; $this->comment = $comment; $this->commentsTreeTemplate = new CommentsTreeTemplate($text, [$comment], true); }
/** * * @param Text $text The text object. * @param User $user The user being added. * @param string[] $allRanks Untranslated rank names, indexed by rank id. * @param RequestToken $requestToken Token for protecting the request. */ public function __construct(Text $text, User $user, array $allRanks, RequestToken $requestToken) { parent::__construct($text); $this->user = $user; $this->allRanks = $allRanks; $this->requestToken = $requestToken; }
public function __construct(Text $text, Category $category, array $articles, $showArticleEditLinks, $showCategoryEditLinks) { parent::__construct($text); $this->category = $category; $this->editLinks = $showCategoryEditLinks; $this->articlesTemplate = new ArticleListTemplate($text, $articles, $category->getId(), true, true, $showArticleEditLinks); }
public function __construct(Text $text, Category $category, RichEditor $richEditor, RequestToken $requestToken) { parent::__construct($text); $this->category = $category; $this->requestToken = $requestToken; $this->richEditor = $richEditor; }
public function __construct(Text $text, $documentId, InstalledWidgets $widgetLoader, array $placedWidgets, $editLinks) { parent::__construct($text); $this->documentId = (int) $documentId; $this->widgetLoader = $widgetLoader; $this->placedWidgets = $placedWidgets; $this->editLinks = (bool) $editLinks; }
public function __construct(Text $text, Document $document, RequestToken $requestToken, InstalledWidgets $installedWidgets, array $placedWidgets) { parent::__construct($text); $this->document = $document; $this->requestToken = $requestToken; $this->installedWidgets = $installedWidgets; $this->placedWidgets = $placedWidgets; }
/** * Creates a view for deleting a menu. * @param Text $text The text object. * @param Menu $menu The menu being considered for deletion. * @param int $linkCount The amount of links in the menu. * @param Menu[] $otherMenus The other menus on the website. * @param RequestToken $requestToken Token for protecting the request. */ public function __construct(Text $text, Menu $menu, $linkCount, array $otherMenus, RequestToken $requestToken) { parent::__construct($text); $this->menu = $menu; $this->linkCount = (int) $linkCount; $this->allMenus = $otherMenus; $this->requestToken = $requestToken; }
/** * Creates a new login view. * @param Text $text The text instance. * @param Request $request The request instance. * @param string $errorMessage Message to display on top of the login form * in a red box. Leave blank for no message. * @param bool $showCreateAccountLink Set to true when a "Create account" * link must be shown. */ public function __construct(Text $text, UriInterface $destination, array $postVars, $errorMessage, $showCreateAccountLink) { parent::__construct($text); $this->destination = $destination; $this->postVars = $postVars; $this->errorMessage = $errorMessage; $this->showCreateAccountLinks = (bool) $showCreateAccountLink; }
/** * Creates a new article viewer. * @param Text $text The website object. * @param Article $article The article. * @param boolean $editLink True to display a link to edit/delete this article. * Which comments are editable depends on the $viewingComments parameter. * @param Comment[] $comments The comments for this article. * @param User|null $viewingComments User viewing the comments, may be null. * Edit/delete links for comments appear if this user matches the the author * of the comment, or if the user is a moderator. */ public function __construct(Text $text, Article $article, $editLink, array $comments = [], User $viewingComments = null) { parent::__construct($text); $this->article = $article; $this->comments = $comments; $this->editLink = (bool) $editLink; $this->userTemplateingComments = $viewingComments; }
public function __construct(Text $text, Article $article, RequestToken $requestToken, RichEditor $richEditor, array $availableCategories) { parent::__construct($text); $this->article = $article; $this->requestToken = $requestToken; $this->richEditor = $richEditor; $this->availableCategories = $availableCategories; }
public function __construct(Text $text, Article $articleToDelete, RequestToken $requestToken, $showAdminPageLink, $state) { parent::__construct($text); $this->article = $articleToDelete; $this->requestToken = $requestToken; $this->state = (int) $state; $this->showAdminPageLink = (bool) $showAdminPageLink; }
public function __construct(Text $text, Menu $menu, $linkText, $linkUrl, RequestToken $requestToken) { parent::__construct($text); $this->menu = $menu; $this->linkText = (string) $linkText; $this->linkUrl = (string) $linkUrl; $this->requestToken = $requestToken; }
/** * Creates the commment renderer. * @param Text $text The website text object. * @param Comment[] $comments List of comments. * @param boolean $viewedOutOfContext Whether there should be a link to the article. * @param User|null $viewer The user viewing the comments, null if logged out. */ public function __construct(Text $text, $comments, $viewedOutOfContext, User $viewer = null) { parent::__construct($text); $this->comments = $comments; $this->viewedByStaff = $viewer === null ? false : $viewer->hasRank(Authentication::RANK_MODERATOR); $this->viewedOutOfContext = $viewedOutOfContext; $this->viewerId = $viewer ? $viewer->getId() : 0; }
/** * Creates a new view of a list of articles. * @param Text $text The website object. * @param Article[] $articles List of articles to display. * @param boolean $editLinks True to show edit links, false otherwise. * @param int $mainCategoryId The id of the category of the archive and the * Add-article link. Use 0 if the articles are of multiple categories. * @param boolean $images Whether images should be shown. * @param boolean $archive Whether a link to the archive should be shown. */ public function __construct(Text $text, $articles, $editLinks, $mainCategoryId = 0, $images = false, $archive = false) { parent::__construct($text); $this->articles = $articles; $this->editLinks = (bool) $editLinks; $this->mainCategoryId = (int) $mainCategoryId; $this->images = (bool) $images; $this->archive = (bool) $archive; }
/** * Creates a new view for a list of articles. * @param Text $text The website object. * @param Article[] $articles List of articles. * @param int $mainCategoryId The category id for archive and create article links. * @param boolean $metainfo Whether author, date and category are shown. * @param boolean $archive Whether a link to the archive is shown. */ public function __construct(Text $text, $articles, $mainCategoryId, $metainfo, $archive, $editLinks) { parent::__construct($text); $this->articles = $articles; $this->mainCategoryId = (int) $mainCategoryId; $this->metainfo = (bool) $metainfo; $this->archive = (bool) $archive; $this->editLinks = (bool) $editLinks; }
/** * Creates a new view for displaying the article archive. * @param Text $text The website object. * @param Article[] $articles Articles to display. * @param int[] $categories Ids of the categories included in the menu bar. * @param int[] $articleCountInYears $year => $articlesInThatYear * @param int $selectedCategory Id of the currently selected category. * @param int $selectedYear Id of the currently selected year. * @param boolean $editLinks True to show edit links, false otherwise. */ public function __construct(Text $text, $articles, $categories, $articleCountInYears, $selectedCategory, $selectedYear, $editLinks) { parent::__construct($text); $this->articles = $articles; $this->categories = $categories; $this->articleCountInYears = $articleCountInYears; $this->selectedCategory = (int) $selectedCategory; $this->selectedYear = (int) $selectedYear; $this->editLinks = (bool) $editLinks; }
/** * Constructs a new calendar view. * @param Text $text The website object. * @param DateTime $month The month to display. * @param Article[] $articlesInMonth All articles in the month, doesn't have to be in any order. * @param boolean $editLinks True to show edit links, false otherwise. */ public function __construct(Text $text, DateTime $month, array $articlesInMonth, $editLinks) { parent::__construct($text); $this->month = $month; $this->editLinks = (bool) $editLinks; // Index by day in month (but only for articles actually in this month) $monthNumber = $month->format('n'); $this->articlesByDay = []; foreach ($articlesInMonth as $article) { if ($article->onCalendar !== null && $article->onCalendar->format('n') === $monthNumber) { $dayNumber = (int) $article->onCalendar->format('j'); $this->articlesByDay[$dayNumber][] = $article; } } }
public function __construct(Text $text) { parent::__construct($text); }
public function __construct(Text $text, Menu $menu, RequestToken $requestToken) { parent::__construct($text); $this->menu = $menu; $this->requestToken = $requestToken; }
public function __construct(Text $text, Link $link, RequestToken $requestToken) { parent::__construct($text); $this->link = $link; $this->requestToken = $requestToken; }
public function __construct(Text $text, Comment $comment, RequestToken $requestToken) { parent::__construct($text); $this->comment = $comment; $this->requestToken = $requestToken; }
/** * Constructs a new menu search view. * @param Text $text The website object. * @param Menu $menu The menu the links are in. * @param Link[] $links Array of links. */ public function __construct(Text $text, Menu $menu, array $links) { parent::__construct($text); $this->menu = $menu; $this->links = $links; }
public function __construct(Text $text, $comments) { parent::__construct($text); $this->comments = $comments; }
/** * Creates the template. * @param Text $text The text object. * @param RequestToken $requestToken Token for protecting the request. * @param ThemeMeta[] $themeInfos The available themes. */ public function __construct(Text $text, RequestToken $requestToken, array $themeInfos) { parent::__construct($text); $this->requestToken = $requestToken; $this->themeInfos = $themeInfos; }