first commit
This commit is contained in:
140
components/com_quantummanager/controller.php
Normal file
140
components/com_quantummanager/controller.php
Normal file
@@ -0,0 +1,140 @@
|
||||
<?php
|
||||
/**
|
||||
* @package quantummanager
|
||||
* @author Dmitry Tsymbal <cymbal@delo-design.ru>
|
||||
* @copyright Copyright © 2019 Delo Design & NorrNext. All rights reserved.
|
||||
* @license GNU General Public License version 3 or later; see license.txt
|
||||
* @link https://www.norrnext.com
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Filter\InputFilter;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\MVC\Controller\BaseController;
|
||||
|
||||
|
||||
/**
|
||||
* Quantummanager Controller.
|
||||
*
|
||||
* @package quantummanager
|
||||
* @since 1.0
|
||||
*/
|
||||
class QuantummanagerController extends BaseController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* Method overridden to make bridges for the front
|
||||
*
|
||||
* @param $prefix
|
||||
* @param $config
|
||||
*
|
||||
* @return JControllerLegacy|mixed
|
||||
*
|
||||
* @throws Exception
|
||||
* @since versio
|
||||
*
|
||||
*/
|
||||
public static function getInstance($prefix, $config = array())
|
||||
{
|
||||
if (is_object(self::$instance))
|
||||
{
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
// проверяем на включенность параметра
|
||||
JLoader::register('QuantummanagerHelper', JPATH_ADMINISTRATOR . '/components/com_quantummanager/helpers/quantummanager.php');
|
||||
|
||||
if (!(int) QuantummanagerHelper::getParamsComponentValue('front', 0))
|
||||
{
|
||||
throw new \InvalidArgumentException(Text::sprintf('JLIB_APPLICATION_ERROR_NOT_ACCESS'));
|
||||
}
|
||||
|
||||
// проверяем что пользователь авторизован
|
||||
if (Factory::getUser()->id === 0)
|
||||
{
|
||||
throw new \InvalidArgumentException(Text::sprintf('JLIB_APPLICATION_ERROR_NOT_ACCESS'));
|
||||
}
|
||||
|
||||
// грузим языки
|
||||
Factory::getLanguage()->load('com_quantummanager', JPATH_ADMINISTRATOR);
|
||||
|
||||
$input = Factory::getApplication()->input;
|
||||
Factory::getApplication()->input->set('view', 'quantummanager');
|
||||
|
||||
// Get the environment configuration.
|
||||
$format = $input->getWord('format');
|
||||
$command = $input->get('task', 'display');
|
||||
|
||||
// Check for array format.
|
||||
$filter = InputFilter::getInstance();
|
||||
|
||||
if (is_array($command))
|
||||
{
|
||||
$command = $filter->clean(array_pop(array_keys($command)), 'cmd');
|
||||
}
|
||||
else
|
||||
{
|
||||
$command = $filter->clean($command, 'cmd');
|
||||
}
|
||||
|
||||
// Check for a controller.task command.
|
||||
if (strpos($command, '.') !== false)
|
||||
{
|
||||
// Explode the controller.task command.
|
||||
list ($type, $task) = explode('.', $command);
|
||||
|
||||
// Define the controller filename and path.
|
||||
$file = self::createFileName('controller', array('name' => $type, 'format' => $format));
|
||||
$path = JPATH_ROOT . '/administrator/components/com_quantummanager/controllers/' . $file;
|
||||
$backuppath = JPATH_ROOT . '/administrator/components/com_quantummanager/controller/' . $file;
|
||||
|
||||
// Reset the task without the controller context.
|
||||
$input->set('task', $task);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Base controller.
|
||||
$type = null;
|
||||
|
||||
// Define the controller filename and path.
|
||||
$file = self::createFileName('controller', array('name' => 'controller', 'format' => $format));
|
||||
$path = JPATH_ROOT . '/administrator/components/com_quantummanager/' . $file;
|
||||
$backupfile = self::createFileName('controller', array('name' => 'controller'));
|
||||
$backuppath = JPATH_ROOT . '/administrator/components/com_quantummanager/' . $backupfile;
|
||||
}
|
||||
|
||||
// Get the controller class name.
|
||||
$class = ucfirst($prefix) . 'Controller' . ucfirst($type);
|
||||
|
||||
// Include the class if not present.
|
||||
if (!class_exists($class))
|
||||
{
|
||||
// If the controller file path exists, include it.
|
||||
if (file_exists($path))
|
||||
{
|
||||
require_once $path;
|
||||
}
|
||||
elseif (isset($backuppath) && file_exists($backuppath))
|
||||
{
|
||||
require_once $backuppath;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new \InvalidArgumentException(Text::sprintf('JLIB_APPLICATION_ERROR_INVALID_CONTROLLER', $type, $format));
|
||||
}
|
||||
}
|
||||
|
||||
// Instantiate the class.
|
||||
if (!class_exists($class))
|
||||
{
|
||||
throw new \InvalidArgumentException(Text::sprintf('JLIB_APPLICATION_ERROR_INVALID_CONTROLLER_CLASS', $class));
|
||||
}
|
||||
|
||||
// Instantiate the class, store it to the static container, and return it
|
||||
return self::$instance = new $class($config);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
;
|
||||
; Quantummanager language file
|
||||
;
|
||||
|
||||
; Menu options
|
||||
COM_QUANTUMMANAGER_QUANTUMMANAGER="Quantum Manager page"
|
||||
COM_QUANTUMMANAGER_QUANTUMMANAGER_DESC_MENU="Show the Quantum Manager page"
|
||||
@@ -0,0 +1,10 @@
|
||||
;
|
||||
; Quantummanager language file
|
||||
;
|
||||
|
||||
; Menu options
|
||||
COM_QUANTUMMANAGER_QUANTUMMANAGER="Quantummanager page"
|
||||
COM_QUANTUMMANAGER_QUANTUMMANAGER_DESC_MENU="Show the quantummanager page"
|
||||
|
||||
COM_QUANTUMMANAGER_FIELDS_QUANTUMUPLOAD_UPLOAD_DROP="Для загрузки перетащите файлы или"
|
||||
COM_QUANTUMMANAGER_FIELDS_QUANTUMUPLOAD_UPLOAD_SELECT="выберите на своем устройстве."
|
||||
18
components/com_quantummanager/quantummanager.php
Normal file
18
components/com_quantummanager/quantummanager.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
/**
|
||||
* @package quantummanager
|
||||
* @author Dmitry Tsymbal <cymbal@delo-design.ru>
|
||||
* @copyright Copyright © 2019 Delo Design & NorrNext. All rights reserved.
|
||||
* @license GNU General Public License version 3 or later; see license.txt
|
||||
* @link https://www.norrnext.com
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
|
||||
include __DIR__ . '/controller.php';
|
||||
|
||||
$controller = QuantummanagerController::getInstance('quantummanager');
|
||||
$controller->execute(Factory::getApplication()->input->get('task'));
|
||||
$controller->redirect();
|
||||
@@ -0,0 +1,122 @@
|
||||
<?php
|
||||
/**
|
||||
* @package quantummanager
|
||||
* @author Dmitry Tsymbal <cymbal@delo-design.ru>
|
||||
* @copyright Copyright © 2019 Delo Design & NorrNext. All rights reserved.
|
||||
* @license GNU General Public License version 3 or later; see license.txt
|
||||
* @link https://www.norrnext.com
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Component\ComponentHelper;
|
||||
use Joomla\CMS\Factory;
|
||||
|
||||
$app = Factory::getApplication();
|
||||
$app->getSession()->clear('quantummanagerroot');
|
||||
$app->getSession()->clear('quantummanagerrootcheck');
|
||||
$app->getSession()->clear('quantummanageraddscripts');
|
||||
|
||||
try {
|
||||
JLoader::register('JFormFieldQuantumCombine', JPATH_ROOT . '/administrator/components/com_quantummanager/fields/quantumcombine.php');
|
||||
JLoader::register('QuantummanagerHelper', JPATH_SITE . '/administrator/components/com_quantummanager/helpers/quantummanager.php');
|
||||
$folderRoot = 'root';
|
||||
|
||||
$buttonsBun = [];
|
||||
$fields = [
|
||||
'quantumtreecatalogs' => [
|
||||
'label' => '',
|
||||
'directory' => $folderRoot,
|
||||
'position' => 'container-left',
|
||||
],
|
||||
'quantumtoolbar' => [
|
||||
'label' => '',
|
||||
'position' => 'container-center-top',
|
||||
'buttons' => 'all',
|
||||
'buttonsBun' => '',
|
||||
'cssClass' => 'qm-padding-small-left qm-padding-small-right qm-padding-small-top qm-padding-small-bottom',
|
||||
],
|
||||
'quantumupload' => [
|
||||
'label' => '',
|
||||
'position' => 'container-center-top',
|
||||
'maxsize' => QuantummanagerHelper::getParamsComponentValue('maxsize', '10'),
|
||||
'dropAreaHidden' => QuantummanagerHelper::getParamsComponentValue('dropareahidden', '0'),
|
||||
'directory' => $folderRoot,
|
||||
'cssClass' => 'qm-padding-small-left qm-padding-small-right qm-padding-small-bottom',
|
||||
],
|
||||
'quantumviewfiles' => [
|
||||
'label' => '',
|
||||
'position' => 'container-center-center',
|
||||
'directory' => $folderRoot,
|
||||
'view' => 'list-grid',
|
||||
'onlyfiles' => '0',
|
||||
'watermark' => QuantummanagerHelper::getParamsComponentValue('overlay' , 0) > 0 ? '1' : '0',
|
||||
'help' => QuantummanagerHelper::getParamsComponentValue('help' , '1'),
|
||||
'metafile' => QuantummanagerHelper::getParamsComponentValue('metafile' , '1'),
|
||||
],
|
||||
'quantumcropperjs' => [
|
||||
'label' => '',
|
||||
'position' => 'bottom'
|
||||
],
|
||||
];
|
||||
|
||||
if((int)QuantummanagerHelper::getParamsComponentValue('unsplash', '1'))
|
||||
{
|
||||
$fields['quantumunsplash'] = [
|
||||
'label' => '',
|
||||
'position' => 'bottom'
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
if((int)QuantummanagerHelper::getParamsComponentValue('pexels', '1'))
|
||||
{
|
||||
$fields['quantumpexels'] = [
|
||||
'label' => '',
|
||||
'position' => 'bottom'
|
||||
];
|
||||
}
|
||||
|
||||
if((int)QuantummanagerHelper::getParamsComponentValue('pixabay', '1'))
|
||||
{
|
||||
$fields['quantumpixabay'] = [
|
||||
'label' => '',
|
||||
'position' => 'bottom'
|
||||
];
|
||||
}
|
||||
|
||||
$actions = QuantummanagerHelper::getActions();
|
||||
if (!$actions->get('core.create'))
|
||||
{
|
||||
$buttonsBun[] = 'viewfilesCreateDirectory';
|
||||
unset($fields['quantumupload']);
|
||||
}
|
||||
|
||||
if (!$actions->get('core.delete'))
|
||||
{
|
||||
unset($fields['quantumcropperjs']);
|
||||
}
|
||||
|
||||
if (!$actions->get('core.delete'))
|
||||
{
|
||||
$buttonsBun[] = 'viewfilesDelete';
|
||||
}
|
||||
|
||||
$optionsForField = [
|
||||
'name' => 'filemanager',
|
||||
'label' => '',
|
||||
'cssClass' => 'quantummanager-height-medium',
|
||||
'fields' => json_encode($fields)
|
||||
];
|
||||
|
||||
$field = new JFormFieldQuantumCombine();
|
||||
foreach ($optionsForField as $name => $value)
|
||||
{
|
||||
$field->__set($name, $value);
|
||||
}
|
||||
echo $field->getInput();
|
||||
|
||||
}
|
||||
catch (Exception $e) {
|
||||
echo $e->getMessage();
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<metadata>
|
||||
<layout title="COM_QUANTUMMANAGER_MENU">
|
||||
<message>
|
||||
<![CDATA[COM_QUANTUMMANAGER_MENU_DESC]]>
|
||||
</message>
|
||||
</layout>
|
||||
</metadata>
|
||||
@@ -0,0 +1,166 @@
|
||||
<?php
|
||||
/**
|
||||
* @package quantummanager
|
||||
* @author Dmitry Tsymbal <cymbal@delo-design.ru>
|
||||
* @copyright Copyright © 2019 Delo Design & NorrNext. All rights reserved.
|
||||
* @license GNU General Public License version 3 or later; see license.txt
|
||||
* @link https://www.norrnext.com
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
$app = Factory::getApplication();
|
||||
$folder = $app->input->get('folder', '', 'string');
|
||||
|
||||
if(!empty($folder))
|
||||
{
|
||||
$app->getSession()->set('quantummanagerroot', 'images/' . $folder);
|
||||
}
|
||||
else
|
||||
{
|
||||
$app->getSession()->clear('quantummanagerroot');
|
||||
$app->getSession()->clear('quantummanagerrootcheck');
|
||||
}
|
||||
|
||||
HTMLHelper::_('stylesheet', 'plg_system_quantummanagermedia/modal.css', [
|
||||
'version' => filemtime(__FILE__),
|
||||
'relative' => true
|
||||
]);
|
||||
|
||||
$namespace = $app->input->get('namespace', 'default');
|
||||
$scripts = $app->getSession()->get('quantummanageraddscripts', '', $namespace);
|
||||
|
||||
if(!empty($scripts))
|
||||
{
|
||||
$scripts = json_decode($scripts, JSON_OBJECT_AS_ARRAY);
|
||||
if(is_array($scripts))
|
||||
{
|
||||
foreach ($scripts as $script)
|
||||
{
|
||||
HTMLHelper::_('script', $script, [
|
||||
'version' => filemtime(__FILE__),
|
||||
'relative' => true
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<?php
|
||||
|
||||
try {
|
||||
JLoader::register('JFormFieldQuantumCombine', JPATH_ROOT . '/administrator/components/com_quantummanager/fields/quantumcombine.php');
|
||||
JLoader::register('QuantummanagerHelper', JPATH_SITE . '/administrator/components/com_quantummanager/helpers/quantummanager.php');
|
||||
$folderRoot = 'root';
|
||||
|
||||
$buttonsBun = [];
|
||||
$fields = [
|
||||
'quantumtreecatalogs' => [
|
||||
'label' => '',
|
||||
'directory' => $folderRoot,
|
||||
'position' => 'container-left',
|
||||
],
|
||||
'quantumtoolbar' => [
|
||||
'label' => '',
|
||||
'position' => 'container-center-top',
|
||||
'buttons' => 'all',
|
||||
'buttonsBun' => '',
|
||||
'cssClass' => 'qm-padding-small-left qm-padding-small-right qm-padding-small-top qm-padding-small-bottom',
|
||||
],
|
||||
'quantumupload' => [
|
||||
'label' => '',
|
||||
'position' => 'container-center-top',
|
||||
'maxsize' => QuantummanagerHelper::getParamsComponentValue('maxsize', '10'),
|
||||
'dropAreaHidden' => QuantummanagerHelper::getParamsComponentValue('dropareahidden', '0'),
|
||||
'directory' => $folderRoot,
|
||||
'cssClass' => 'qm-padding-small-left qm-padding-small-right qm-padding-small-bottom',
|
||||
],
|
||||
'quantumviewfiles' => [
|
||||
'label' => '',
|
||||
'position' => 'container-center-center',
|
||||
'directory' => $folderRoot,
|
||||
'view' => 'list-grid',
|
||||
'onlyfiles' => '0',
|
||||
'watermark' => QuantummanagerHelper::getParamsComponentValue('overlay' , 0) > 0 ? '1' : '0',
|
||||
'help' => QuantummanagerHelper::getParamsComponentValue('help' , '1'),
|
||||
'metafile' => QuantummanagerHelper::getParamsComponentValue('metafile' , '1'),
|
||||
],
|
||||
'quantumcropperjs' => [
|
||||
'label' => '',
|
||||
'position' => 'bottom'
|
||||
],
|
||||
];
|
||||
|
||||
if((int)QuantummanagerHelper::getParamsComponentValue('unsplash', '1'))
|
||||
{
|
||||
$fields['quantumunsplash'] = [
|
||||
'label' => '',
|
||||
'position' => 'bottom'
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
if((int)QuantummanagerHelper::getParamsComponentValue('pexels', '1'))
|
||||
{
|
||||
$fields['quantumpexels'] = [
|
||||
'label' => '',
|
||||
'position' => 'bottom'
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
if((int)QuantummanagerHelper::getParamsComponentValue('pixabay', '1'))
|
||||
{
|
||||
$fields['quantumpixabay'] = [
|
||||
'label' => '',
|
||||
'position' => 'bottom'
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
$actions = QuantummanagerHelper::getActions();
|
||||
if (!$actions->get('core.create'))
|
||||
{
|
||||
$buttonsBun[] = 'viewfilesCreateDirectory';
|
||||
unset($fields['quantumupload']);
|
||||
}
|
||||
|
||||
if (!$actions->get('core.delete'))
|
||||
{
|
||||
unset($fields['quantumcropperjs']);
|
||||
}
|
||||
|
||||
if (!$actions->get('core.delete'))
|
||||
{
|
||||
$buttonsBun[] = 'viewfilesDelete';
|
||||
}
|
||||
|
||||
$optionsForField = [
|
||||
'name' => 'filemanager',
|
||||
'label' => '',
|
||||
'fields' => json_encode($fields)
|
||||
];
|
||||
|
||||
$field = new JFormFieldQuantumCombine();
|
||||
foreach ($optionsForField as $name => $value)
|
||||
{
|
||||
$field->__set($name, $value);
|
||||
}
|
||||
echo $field->getInput();
|
||||
}
|
||||
catch (Exception $e) {
|
||||
echo $e->getMessage();
|
||||
}
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
window.QuantumwindowLang = {
|
||||
'buttonInsert': '<?php echo Text::_('COM_QUANTUMMANAGER_ACTION_SELECT'); ?>'
|
||||
};
|
||||
</script>
|
||||
@@ -0,0 +1,140 @@
|
||||
<?php
|
||||
/**
|
||||
* @package quantummanager
|
||||
* @author Dmitry Tsymbal <cymbal@delo-design.ru>
|
||||
* @copyright Copyright © 2019 Delo Design & NorrNext. All rights reserved.
|
||||
* @license GNU General Public License version 3 or later; see license.txt
|
||||
* @link https://www.norrnext.com
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
HTMLHelper::_('stylesheet', 'com_quantummanager/window.css', [
|
||||
'version' => filemtime(__FILE__),
|
||||
'relative' => true
|
||||
]);
|
||||
|
||||
HTMLHelper::_('script', 'com_quantummanager/window.js', [
|
||||
'version' => filemtime(__FILE__),
|
||||
'relative' => true
|
||||
]);
|
||||
|
||||
$app = Factory::getApplication();
|
||||
$app->getSession()->clear('quantummanagerroot');
|
||||
$app->getSession()->clear('quantummanagerrootcheck');
|
||||
$app->getSession()->clear('quantummanageraddscripts');
|
||||
|
||||
try {
|
||||
JLoader::register('JFormFieldQuantumCombine', JPATH_ROOT . '/administrator/components/com_quantummanager/fields/quantumcombine.php');
|
||||
JLoader::register('QuantummanagerHelper', JPATH_SITE . '/administrator/components/com_quantummanager/helpers/quantummanager.php');
|
||||
//$folderRoot = QuantummanagerHelper::getFolderRoot();
|
||||
$folderRoot = 'root';
|
||||
|
||||
$buttonsBun = [];
|
||||
$fields = [
|
||||
'quantumtreecatalogs' => [
|
||||
'label' => '',
|
||||
'directory' => $folderRoot,
|
||||
'position' => 'container-left',
|
||||
],
|
||||
'quantumtoolbar' => [
|
||||
'label' => '',
|
||||
'position' => 'container-center-top',
|
||||
'buttons' => 'all',
|
||||
'buttonsBun' => '',
|
||||
'cssClass' => 'qm-padding-small-left qm-padding-small-right qm-padding-small-top qm-padding-small-bottom',
|
||||
],
|
||||
'quantumupload' => [
|
||||
'label' => '',
|
||||
'position' => 'container-center-top',
|
||||
'maxsize' => QuantummanagerHelper::getParamsComponentValue('maxsize', '10'),
|
||||
'dropAreaHidden' => QuantummanagerHelper::getParamsComponentValue('dropareahidden', '0'),
|
||||
'directory' => $folderRoot,
|
||||
'cssClass' => 'qm-padding-small-left qm-padding-small-right qm-padding-small-bottom',
|
||||
],
|
||||
'quantumviewfiles' => [
|
||||
'label' => '',
|
||||
'position' => 'container-center-center',
|
||||
'directory' => $folderRoot,
|
||||
'view' => 'list-grid',
|
||||
'onlyfiles' => '0',
|
||||
'watermark' => QuantummanagerHelper::getParamsComponentValue('overlay' , 0) > 0 ? '1' : '0',
|
||||
'help' => QuantummanagerHelper::getParamsComponentValue('help' , '1'),
|
||||
'metafile' => QuantummanagerHelper::getParamsComponentValue('metafile' , '1'),
|
||||
],
|
||||
'quantumcropperjs' => [
|
||||
'label' => '',
|
||||
'position' => 'bottom'
|
||||
],
|
||||
];
|
||||
|
||||
if((int)QuantummanagerHelper::getParamsComponentValue('unsplash', '1'))
|
||||
{
|
||||
$fields['quantumunsplash'] = [
|
||||
'label' => '',
|
||||
'position' => 'bottom'
|
||||
];
|
||||
}
|
||||
|
||||
if((int)QuantummanagerHelper::getParamsComponentValue('pexels', '1'))
|
||||
{
|
||||
$fields['quantumpexels'] = [
|
||||
'label' => '',
|
||||
'position' => 'bottom'
|
||||
];
|
||||
}
|
||||
|
||||
if((int)QuantummanagerHelper::getParamsComponentValue('pixabay', '1'))
|
||||
{
|
||||
$fields['quantumpixabay'] = [
|
||||
'label' => '',
|
||||
'position' => 'bottom'
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
$actions = QuantummanagerHelper::getActions();
|
||||
if (!$actions->get('core.create'))
|
||||
{
|
||||
$buttonsBun[] = 'viewfilesCreateDirectory';
|
||||
unset($fields['quantumupload']);
|
||||
}
|
||||
|
||||
if (!$actions->get('core.delete'))
|
||||
{
|
||||
unset($fields['quantumcropperjs']);
|
||||
}
|
||||
|
||||
if (!$actions->get('core.delete'))
|
||||
{
|
||||
$buttonsBun[] = 'viewfilesDelete';
|
||||
}
|
||||
|
||||
$optionsForField = [
|
||||
'name' => 'filemanager',
|
||||
'label' => '',
|
||||
'cssClass' => 'quantummanager-full-wrap',
|
||||
'fields' => json_encode($fields)
|
||||
];
|
||||
|
||||
$field = new JFormFieldQuantumCombine();
|
||||
foreach ($optionsForField as $name => $value)
|
||||
{
|
||||
$field->__set($name, $value);
|
||||
}
|
||||
echo $field->getInput();
|
||||
}
|
||||
catch (Exception $e) {
|
||||
echo $e->getMessage();
|
||||
}
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
window.QuantumwindowLang = {
|
||||
'buttonClose': '<?php echo Text::_('COM_QUANTUMMANAGER_WINDOW_CLOSE'); ?>'
|
||||
};
|
||||
</script>
|
||||
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
/**
|
||||
* @package quantummanager
|
||||
* @author Dmitry Tsymbal <cymbal@delo-design.ru>
|
||||
* @copyright Copyright © 2019 Delo Design & NorrNext. All rights reserved.
|
||||
* @license GNU General Public License version 3 or later; see license.txt
|
||||
* @link https://www.norrnext.com
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\MVC\View\HtmlView;
|
||||
|
||||
/**
|
||||
* Quantummanager view.
|
||||
*
|
||||
* @package quantummanager
|
||||
* @since 1.0
|
||||
*/
|
||||
class QuantummanagerViewQuantummanager extends HtmlView
|
||||
{
|
||||
|
||||
/**
|
||||
* Quantummanager helper
|
||||
*
|
||||
* @var QuantummanagerHelper
|
||||
* @since 1.0
|
||||
*/
|
||||
protected $helper;
|
||||
|
||||
/**
|
||||
* Execute and display a template script.
|
||||
*
|
||||
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
|
||||
*
|
||||
* @return mixed A string if successful, otherwise a JError object.
|
||||
*
|
||||
* @see fetch()
|
||||
* @since 1.0
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
|
||||
// Show the sidebar
|
||||
$this->helper = new QuantummanagerHelper;
|
||||
|
||||
// Display it all
|
||||
return parent::display($tpl);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user