- md5
- cdea0f7e0ffc2c97b46cf059ef96faa3
- sha1
- 2739131a78ae30e8a8c00f37ee6771bddd358748
- sha256
- d4f6fa229c46d7834f7e05d570483886c737fdba96443c5a4d1bbdd33bbcf106
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
<?php
/**
* @package Joomla.Administrator
* @subpackage com_workflow
*
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace Joomla\Component\Workflow\Administrator\Controller;
defined('_JEXEC') or die;
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
use Joomla\Input\Input;
/**
* Workflow base controller package.
*
* @since 4.0.0
*/
class DisplayController extends BaseController
{
/**
* The default view.
*
* @var string
* @since 4.0.0
*/
protected $default_view = 'workflows';
/**
* The extension for which the workflow apply.
*
* @var string
* @since 4.0.0
*/
protected $extension;
/**
* Constructor.
*
* @param array $config An optional associative array of configuration settings.
* @param MVCFactoryInterface $factory The factory.
* @param CMSApplication $app The JApplication for the dispatcher
* @param Input $input Input
*
* @since 4.0.0
* @throws \InvalidArgumentException when no extension is set
*/
public function __construct($config = array(), MVCFactoryInterface $factory = null, $app = null, $input = null)
{
parent::__construct($config, $factory, $app, $input);
// If extension is not set try to get it from input or throw an exception
if (empty($this->extension))
{
$this->extension = $this->input->getCmd('extension');
if (empty($this->extension))
{
throw new \InvalidArgumentException(Text::_('COM_WORKFLOW_ERROR_EXTENSION_NOT_SET'));
}
}
}
}
The same content is in 3 releases, Joomla 4.0.0-alpha10 to 4.0.0-alpha12. See them all, or every version of this file.