CoreFiles by mySites.guru
TableColumnsAssetItem.php43 lines, 1,094 bytes, from Joomla_5.3.2-Stable-Full_Package.zip
Raw History Compare with 5.3.1
md5
a2b5b30632f9162f4aef35a0a1ecd786
sha1
ed3fbd8fca19c8092a1ed8a3fb0b5e64a96a66a4
sha256
036233efd729f4c9a454de9eeb870cf640285a9e6d743b3aed48fa9326271d5a
<?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('_JEXEC') 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 155 releases, Joomla 5.0.0-alpha1 to 6.2.1-rc1. See them all, or every version of this file.