CoreFiles by mySites.guru
TableColumnsAssetItem.php43 lines, 1,102 bytes, from Joomla_4.3.2-Stable-Full_Package.zip
Raw History Compare with 4.3.1
md5
f154e511e57773e39fb5b6a743d05000
sha1
a8d875b38cc4caa0ab25535e7310e70dc9a0fb4c
sha256
e4cf32fd0f0944c6265aa3be6a8c30a0d9dd17bdf8a4e02b79d067ce2a47d6b0
<?php

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

namespace Joomla\CMS\WebAsset\AssetItem;

use Joomla\CMS\Document\Document;
use Joomla\CMS\Language\Text;
use Joomla\CMS\WebAsset\WebAssetAttachBehaviorInterface;
use Joomla\CMS\WebAsset\WebAssetItem;

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

/**
 * Web Asset Item class for tables.column asset
 *
 * @since  4.2.0
 */
class TableColumnsAssetItem extends WebAssetItem implements WebAssetAttachBehaviorInterface
{
    /**
     * Method called when asset attached to the Document.
     * Used to add the language strings required by the script.
     *
     * @param   Document  $doc  Active document
     *
     * @return  void
     *
     * @since   4.2.0
     */
    public function onAttachCallback(Document $doc)
    {
        // Add table-columns.js language strings
        Text::script('JGLOBAL_COLUMNS');
    }
}

The same content is in 70 releases, Joomla 4.2.1 to 4.4.14. See them all, or every version of this file.