__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
<?php

/**
 * Joomla! Content Management System
 *
 * @copyright  (C) 2013 Open Source Matters, Inc. <https://www.joomla.org>
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */

namespace Joomla\CMS\Helper;

use Joomla\CMS\Application\ApplicationHelper;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\LanguageHelper;
use Joomla\CMS\Language\Multilanguage;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\Table\TableInterface;
use Joomla\Registry\Registry;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects

/**
 * Base Helper class.
 *
 * @since  3.2
 */
class CMSHelper
{
    /**
     * Gets the current language
     *
     * @param   boolean  $detectBrowser  Flag indicating whether to use the browser language as a fallback.
     *
     * @return  string  The language string
     *
     * @since   3.2
     */
    public function getCurrentLanguage($detectBrowser = true)
    {
        $app      = Factory::getApplication();
        $langCode = null;

        // Get the languagefilter parameters
        if (Multilanguage::isEnabled()) {
            $plugin       = PluginHelper::getPlugin('system', 'languagefilter');
            $pluginParams = new Registry($plugin->params);

            if ((int) $pluginParams->get('lang_cookie', 1) === 1) {
                $langCode = $app->getInput()->cookie->getString(ApplicationHelper::getHash('language'));
            } else {
                $langCode = $app->getSession()->get('plg_system_languagefilter.language');
            }
        }

        // No cookie - let's try to detect browser language or use site default
        if (!$langCode) {
            if ($detectBrowser) {
                $langCode = LanguageHelper::detectLanguage();
            } else {
                $langCode = ComponentHelper::getParams('com_languages')->get('site', 'en-GB');
            }
        }

        return $langCode;
    }

    /**
     * Gets the associated language ID
     *
     * @param   string  $langCode  The language code to look up
     *
     * @return  integer  The language ID
     *
     * @since   3.2
     */
    public function getLanguageId($langCode)
    {
        $db    = Factory::getDbo();
        $query = $db->getQuery(true)
            ->select($db->quoteName('lang_id'))
            ->from($db->quoteName('#__languages'))
            ->where($db->quoteName('lang_code') . ' = :language')
            ->bind(':language', $langCode);
        $db->setQuery($query);

        return $db->loadResult();
    }

    /**
     * Gets a row of data from a table
     *
     * @param   TableInterface  $table  Table instance for a row.
     *
     * @return  array  Associative array of all columns and values for a row in a table.
     *
     * @since   3.2
     */
    public function getRowData(TableInterface $table)
    {
        $fields = $table->getFields();
        $data   = [];

        foreach ($fields as &$field) {
            $columnName        = $field->Field;
            $value             = $table->$columnName;
            $data[$columnName] = $value;
        }

        return $data;
    }

    /**
     * Method to get an object containing all of the table columns and values.
     *
     * @param   TableInterface  $table  Table object.
     *
     * @return  \stdClass  Contains all of the columns and values.
     *
     * @since   3.2
     */
    public function getDataObject(TableInterface $table)
    {
        $fields     = $table->getFields();
        $dataObject = new \stdClass();

        foreach ($fields as $field) {
            $fieldName              = $field->Field;
            $dataObject->$fieldName = $table->$fieldName ?? null;
        }

        return $dataObject;
    }
}

Filemanager

Name Type Size Permission Actions
AuthenticationHelper.php File 5.65 KB 0664
CMSHelper.php File 3.72 KB 0664
ContentHelper.php File 8.46 KB 0664
HelperFactory.php File 1.58 KB 0664
HelperFactoryAwareInterface.php File 736 B 0664
HelperFactoryAwareTrait.php File 1.31 KB 0664
HelperFactoryInterface.php File 735 B 0664
LibraryHelper.php File 5.54 KB 0664
MediaHelper.php File 17.52 KB 0664
ModuleHelper.php File 24.05 KB 0664
PublicFolderGeneratorHelper.php File 7.14 KB 0664
RouteHelper.php File 8.49 KB 0664
TagsHelper.php File 42.17 KB 0664
UserGroupsHelper.php File 6.96 KB 0664
Filemanager