File manager - Edit - /home/opticamezl/www/newok/Modules.tar
Back
JsonapiView.php 0000644 00000006052 15173242640 0007522 0 ustar 00 <?php /** * @package Joomla.API * @subpackage com_modules * * @copyright (C) 2019 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\Component\Modules\Api\View\Modules; use Joomla\CMS\MVC\View\JsonApiView as BaseApiView; use Joomla\CMS\Router\Exception\RouteNotFoundException; use Joomla\Component\Modules\Administrator\Model\SelectModel; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * The modules view * * @since 4.0.0 */ class JsonapiView extends BaseApiView { /** * The fields to render item in the documents * * @var array * @since 4.0.0 */ protected $fieldsToRenderItem = [ 'id', 'typeAlias', 'asset_id', 'title', 'note', 'content', 'ordering', 'position', 'checked_out', 'checked_out_time', 'publish_up', 'publish_down', 'published', 'module', 'access', 'showtitle', 'params', 'client_id', 'language', 'assigned', 'assignment', 'xml', ]; /** * The fields to render items in the documents * * @var array * @since 4.0.0 */ protected $fieldsToRenderList = [ 'id', 'title', 'note', 'position', 'module', 'language', 'checked_out', 'checked_out_time', 'published', 'enabled', 'access', 'ordering', 'publish_up', 'publish_down', 'language_title', 'language_image', 'editor', 'access_level', 'pages', 'name', ]; /** * Execute and display a template script. * * @param object $item Item * * @return string * * @since 4.0.0 */ public function displayItem($item = null) { /** @var \Joomla\CMS\MVC\Model\AdminModel $model */ $model = $this->getModel(); if ($item === null) { $item = $this->prepareItem($model->getItem()); } if ($item->id === null) { throw new RouteNotFoundException('Item does not exist'); } if ((int) $model->getState('client_id') !== $item->client_id) { throw new RouteNotFoundException('Item does not exist'); } return parent::displayItem($item); } /** * Execute and display a list modules types. * * @return string * * @since 4.0.0 */ public function displayListTypes() { /** @var SelectModel $model */ $model = $this->getModel(); $items = []; foreach ($model->getItems() as $item) { $item->id = $item->extension_id; unset($item->extension_id); $items[] = $item; } $this->fieldsToRenderList = ['id', 'name', 'module', 'xml', 'desc']; return parent::displayList($items); } } HtmlView.php 0000644 00000004677 15173466364 0007051 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage com_config * * @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\Component\Config\Site\View\Modules; use Joomla\CMS\Factory; use Joomla\CMS\Form\Form; use Joomla\CMS\Language\Text; use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * View to edit a module. * * @since 3.2 */ class HtmlView extends BaseHtmlView { /** * The module to be rendered * * @var array * * @since 3.2 */ public $item; /** * The form object * * @var Form * * @since 3.2 */ public $form; /** * Execute and display a template script. * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return void * * @since 3.2 */ public function display($tpl = null) { $lang = Factory::getApplication()->getLanguage(); $lang->load('', JPATH_ADMINISTRATOR, $lang->getTag()); $lang->load('com_modules', JPATH_ADMINISTRATOR, $lang->getTag()); // @todo Move and clean up $module = (new \Joomla\Component\Modules\Administrator\Model\ModuleModel())->getItem(Factory::getApplication()->getInput()->getInt('id')); $moduleData = $module->getProperties(); unset($moduleData['xml']); /** @var \Joomla\Component\Config\Site\Model\ModulesModel $model */ $model = $this->getModel(); // Need to add module name to the state of model $model->getState()->set('module.name', $moduleData['module']); /** @var Form form */ $this->form = $this->get('form'); $this->positions = $this->get('positions'); $this->item = $moduleData; if ($this->form) { $this->form->bind($moduleData); } $this->_prepareDocument(); parent::display($tpl); } /** * Prepares the document. * * @return void * * @since 4.0.0 */ protected function _prepareDocument() { // There is no menu item for this so we have to use the title from the component $this->setDocumentTitle(Text::_('COM_CONFIG_MODULES_SETTINGS_TITLE')); } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.23 | Generation time: 0 |
proxy
|
phpinfo
|
Settings