Example #1
0
    protected function _initialize(KConfig $config)
    {
        $config->append(array(
            'model' => 'documents',
            'view'  => 'download'
        ));

        parent::_initialize($config);
    }
Example #2
0
    public function getRequest()
    {
        $request = parent::getRequest();

        if($this->isDispatched())
        {
            //Set force download
            $params = JFactory::getApplication()->getMenu()->getActive()->params;

            if ($params->get('force_download')) {
                $request->query->set('force-download', 1);
            }
        }

        return $request;
    }