DiscussionsController::promoted PHP Method

promoted() public method

Parameters & values must be lowercase and via GET.
See also: PromotedContentModule
public promoted ( )
    public function promoted()
    {
        // Create module & set data.
        $PromotedModule = new PromotedContentModule();
        $Status = $PromotedModule->Load(Gdn::request()->get());
        if ($Status === true) {
            // Good parameters.
            $PromotedModule->GetData();
            $this->setData('Content', $PromotedModule->data('Content'));
            $this->setData('Title', t('Promoted Content'));
            $this->setData('View', c('Vanilla.Discussions.Layout'));
            $this->setData('EmptyMessage', t('No discussions were found.'));
            // Pass display properties to the view.
            $this->Group = $PromotedModule->Group;
            $this->TitleLimit = $PromotedModule->TitleLimit;
            $this->BodyLimit = $PromotedModule->BodyLimit;
        } else {
            $this->setData('Errors', $Status);
        }
        $this->deliveryMethod();
        Gdn_Theme::section('PromotedContent');
        $this->render('promoted', 'modules', 'vanilla');
    }