Class constructor
public __construct ( object $Sender = '', $ApplicationFolder = false ) | ||
$Sender | object |
public function __construct($Sender = '') { $this->HtmlId = 'SideMenu'; $this->AutoLinkGroups = TRUE; $this->ClearGroups(); parent::__construct($Sender); }
public function __construct($Sender = '', $ApplicationFolder = FALSE) { if (!$ApplicationFolder) { $ApplicationFolder = 'Dashboard'; } parent::__construct($Sender, $ApplicationFolder); }
public function __construct($Sender = '') { $this->_TagData = FALSE; $this->ParentID = NULL; $this->ParentType = 'Global'; $this->CategorySearch = C('Plugins.Tagging.CategorySearch', FALSE); parent::__construct($Sender); }
public function __construct($Sender = '', $ApplicationFolder = FALSE) { if (!$ApplicationFolder) { $ApplicationFolder = 'Dashboard'; } parent::__construct($Sender, $ApplicationFolder); $this->Visible = C('Garden.Modules.ShowGuestModule'); }
/** * @param string $Sender */ public function __construct($Sender = '') { $this->_TagData = false; $this->ParentID = null; $this->ParentType = 'Global'; $this->CategorySearch = c('Plugins.Tagging.CategorySearch', false); parent::__construct($Sender); }
public function __construct($Sender = '') { $this->_Tags = array(); $this->_Strings = array(); $this->_Title = ''; $this->_SubTitle = ''; $this->_TitleDivider = ''; parent::__construct($Sender); }
/** * @param Gdn_Controller $Controller The controller using this model. */ public function __construct($Sender) { parent::__construct($Sender); if (property_exists($Sender, 'Form')) { $this->Form($Sender->Form); } $this->ConfigurationModule = $this; }
public function __construct($Sender = '') { parent::__construct($Sender); $this->_ApplicationFolder = 'dashboard'; $this->HtmlId = 'SideMenu'; $this->AutoLinkGroups = TRUE; $this->ClearGroups(); }
/** * @param int $categoryID The ID of the category we're in. * @param string $selectedSort The selected sort. * @param array $selectedFilters The selected filters. */ public function __construct($categoryID = 0, $selectedSort = '', $selectedFilters = []) { parent::__construct(); if ($categoryID) { $this->categoryID = $categoryID; } $this->selectedSort = $selectedSort; $this->selectedFilters = $selectedFilters; }
public function __construct($Sender) { parent::__construct($Sender, 'Vanilla'); $this->Visible = c('Vanilla.Discussions.UserSortField'); // Default options $this->SortOptions = array('d.DateLastComment' => t('SortOptionLastComment', 'by Last Comment'), 'd.DateInserted' => t('SortOptionStartDate', 'by Start Date')); // Get sort option selected $this->SortFieldSelected = Gdn::session()->GetPreference('Discussions.SortField', 'd.DateLastComment'); }
public function __construct($Sender) { deprecated('DiscussionSorterModule', 'DiscussionSortFilterModule', 'March 2016'); parent::__construct($Sender, 'Vanilla'); $this->Visible = false; // Default options $this->SortOptions = array('d.DateLastComment' => t('SortOptionLastComment', 'by Last Comment'), 'd.DateInserted' => t('SortOptionStartDate', 'by Start Date')); // Get sort option selected $this->SortFieldSelected = Gdn::session()->GetPreference('Discussions.SortField', 'd.DateLastComment'); }
/** * MediaItemModule constructor. * * @param string $title The media item heading. * @param string $titleUrl If the heading is an anchor, the anchor url (the view handles url()-ing). * @param string $description The media item description text. * @param string $tag The root-level tag of the media item, usually a div or li. * @param array $attributes The root-level attributes for the Media Item. */ public function __construct($title = '', $titleUrl = '', $description = '', $tag = 'div', $attributes = []) { parent::__construct(); $this->description = $description; $this->title = $title; if ($titleUrl) { $this->titleUrl = $titleUrl; } $this->tag = $tag; $this->attributes = $attributes; }
public function __construct(&$Sender = '') { // Load categories $this->_CategoryData = FALSE; if (Gdn::Config('Vanilla.Categories.Use') == TRUE) { if (!property_exists($Sender, 'CategoryModel') || !is_object($Sender->CategoryModel)) { $Sender->CategoryModel = new CategoryModel(); } $this->_CategoryData = $Sender->CategoryModel->GetFull(); } parent::__construct($Sender); }
/** * * * @param string $cssClass A potential CSS class of the dropdown menu wrapper container. * @param bool $useCssPrefix Whether to use CSS prefixes on the nav items. */ public function __construct($cssClass = '', $useCssPrefix = true) { parent::__construct(); $this->flatten = false; $this->useCssPrefix = $useCssPrefix; $this->cssClass = $cssClass; if ($useCssPrefix) { $this->headerCssClassPrefix = 'nav-header'; $this->linkCssClassPrefix = 'nav-link'; $this->dropdownCssClassPrefix = 'nav-dropdown'; $this->dividerCssClassPrefix = 'divider'; } }
public function __construct($Sender = '') { // Load categories $this->Data = FALSE; if (C('Vanilla.Categories.Use') == TRUE && !C('Vanilla.Categories.HideModule')) { if (!property_exists($Sender, 'CategoryModel') || !is_object($Sender->CategoryModel)) { $Sender->CategoryModel = new CategoryModel(); } $Sender->CategoryModel->Watching = TRUE; $this->Data = $Sender->CategoryModel->GetFull(); } parent::__construct($Sender); }
/** * FlatCategoryModule constructor. * * @param string|Gdn_Controller $sender * @param bool|string $applicationFolder */ public function __construct($sender = '', $applicationFolder = false) { parent::__construct($sender, $applicationFolder); $this->categoryModel = new CategoryModel(); $this->limit = $this::DEFAULT_LIMIT; // If this is coming from the module controller, populate some properties by query parameters. if ($sender instanceof ModuleController) { $paramWhitelist = ['categoryID' => Gdn::request()->get('categoryID', Gdn::request()->get('CategoryID')), 'filter' => Gdn::request()->get('filter', Gdn::request()->get('Filter')), 'limit' => Gdn::request()->get('limit', Gdn::request()->get('Limit'))]; foreach ($paramWhitelist as $property => $value) { if ($value) { $this->{$property} = $value; } } } }
/** * Retrieves the user's badgelist upon construction of the module object. * * @param string $Sender */ public function __construct($Sender = '') { parent::__construct($Sender); // default to the user object on the controller/the currently logged in user if (property_exists($Sender, 'User') && $Sender->User) { $UserID = $Sender->User->UserID; } else { $UserID = Gdn::Session()->UserID; } if (Gdn::Session()->UserID == $UserID) { $this->Title = T('Yaga.Badges.Mine'); } else { $this->Title = T('Yaga.Badges'); } $BadgeAwardModel = Yaga::BadgeAwardModel(); $this->Data = $BadgeAwardModel->GetByUser($UserID); }
public function __construct($Sender = '', $ApplicationFolder = '') { $this->Data = FALSE; $NoFollowing = TRUE; if (C('Vanilla.Categories.Use') == TRUE) { // Load categories with respect to view permissions $Categories = CategoryModel::Categories(); $Categories2 = $Categories; foreach ($Categories2 as $i => $Category) { if (!$Category['PermsDiscussionsView']) { unset($Categories[$i]); } elseif (!$Category['Following']) { $NoFollowing = FALSE; } } // delete view filter if no categories are hidden $Session = Gdn::Session(); if ($NoFollowing && $Session->IsValid()) { $Session->SetPreference('ShowAllCategories', TRUE); } // set categories to data $Data = new Gdn_DataSet($Categories); $Data->DatasetType(DATASET_TYPE_ARRAY); $Data->DatasetType(DATASET_TYPE_OBJECT); $this->Data['Categories'] = $Data; // calculate additional needed data $this->Data['CategoryID'] = isset($Sender->CategoryID) ? $Sender->CategoryID : ''; $this->Data['OnCategories'] = strtolower($Sender->ControllerName) == 'categoriescontroller' && !is_numeric($this->Data['CategoryID']); $this->Data['ShowAllCategoriesPref'] = $Session->GetPreference('ShowAllCategories'); $this->Data['Url'] = Gdn::Request()->Path(); if ($this->Data['Url'] == '') { $this->Data['Url'] = '/'; } $this->Data['ShowAllCategoriesUrl'] = Gdn::Request()->Url('categories/settoggle?ShowAllCategories=true&Target=' . $this->Data['Url']); $this->Data['ShowFollowedCategoriesUrl'] = Gdn::Request()->Url('categories/settoggle?ShowAllCategories=false&Target=' . $this->Data['Url']); $this->Data['TKey'] = urlencode(Gdn::Session()->TransientKey()); $this->Data['ValidSession'] = $Session->UserID > 0 && $Session->ValidateTransientKey($this->Data['TKey']); $this->Data['MaxDepth'] = C('Vanilla.Categories.MaxDisplayDepth'); $this->Data['DoHeadings'] = C('Vanilla.Categories.DoHeadings'); } parent::__construct($Sender, $ApplicationFolder); }
public function __construct($Sender = '') { // Load categories $this->Data = FALSE; if (C('Vanilla.Categories.Use') == TRUE && !C('Vanilla.Categories.HideModule')) { $Categories = CategoryModel::Categories(); $Categories2 = $Categories; // Filter out the categories we aren't watching. foreach ($Categories2 as $i => $Category) { if (!$Category['PermsDiscussionsView'] || !$Category['Following']) { unset($Categories[$i]); } } $Data = new Gdn_DataSet($Categories); $Data->DatasetType(DATASET_TYPE_ARRAY); $Data->DatasetType(DATASET_TYPE_OBJECT); $this->Data = $Data; } parent::__construct($Sender); }
public function __construct(&$Sender = '') { $this->User = FALSE; parent::__construct($Sender); }
/** * * * @param string $Sender */ public function __construct($Sender = '') { $this->ClientID = 'Pager'; $this->CssClass = 'Pager'; $this->Offset = 0; $this->Limit = self::$DefaultPageSize; $this->TotalRecords = false; $this->Wrapper = '<div class="PagerWrap"><div %1$s>%2$s</div></div>'; $this->PagerEmpty = ''; $this->MoreCode = '»'; $this->LessCode = '«'; $this->Url = '/controller/action/$s/'; $this->_PropertiesDefined = false; $this->_Totalled = false; $this->_LastOffset = 0; parent::__construct($Sender); }
public function __construct($Sender = '', $Message = FALSE) { parent::__construct($Sender); $this->_Message = $Message; }
public function __construct($Sender = '', $ApplicationFolder = FALSE) { parent::__construct($Sender, $ApplicationFolder); // Customize main button by setting Vanilla.DefaultNewButton to URL code. Example: "post/question" $this->DefaultButton = C('Vanilla.DefaultNewButton', FALSE); }
public function __construct($Sender = '') { parent::__construct($Sender); $this->_ApplicationFolder = 'vanilla'; $this->Visible = c('Vanilla.Categories.Use') && !c('Vanilla.Categories.HideModule'); }
/** * * * @param string $Sender */ public function __construct($Sender = '') { $this->_ApplicationFolder = 'dashboard'; parent::__construct($Sender); }
public function __construct() { parent::__construct(); $this->_ApplicationFolder = 'conversations'; $this->UserID = Gdn::session()->UserID; }
public function __construct() { parent::__construct(); $this->_ApplicationFolder = 'vanilla'; $this->Visible = c('Vanilla.Modules.ShowBookmarkedModule', true); }
public function __construct(&$Sender = '') { $this->_TagData = FALSE; $this->_DiscussionID = 0; parent::__construct($Sender); }
/** * * * @param string $Sender */ public function __construct($Sender = '') { $this->HtmlId = 'Menu'; $this->ClearGroups(); parent::__construct($Sender); }
/** * * * @param string $Sender */ public function __construct($Sender = '') { $this->_UserData = false; parent::__construct($Sender); }