CoreFiles by mySites.guru
ModuleLayoutRule.php40 lines, 1,178 bytes, from Joomla_5.2.3-Stable-Full_Package.zip
Raw History Compare with 5.2.2
md5
2afebe3123dabc7f8b85a0ec584b3dae
sha1
8d99cba08b26caf7e32e3f28e5506d4c146b456a
sha256
4bca7a2879a549496304e7fc898153c0f0ec38d7a856b2337ed2d01bda4efd80
<?php

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

namespace Joomla\CMS\Form\Rule;

use Joomla\CMS\Form\FormRule;

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

/**
 * Form Rule class for the Joomla Platform.
 *
 * @since  3.9.26
 */
class ModuleLayoutRule extends FormRule
{
    /**
     * The regular expression to use in testing a module layout field value.
     *
     * A valid module layout field value consists of
     * - optionally a template name with only characters, numbers, hyphens and
     *   underscores, which can also be just "_" for layouts provided by the
     *   module, followed by a colon.
     * - the base name of the layout file, not starting with a dot and with
     *   only characters, numbers, dots and hyphens but no underscores (see
     *   method "getInput" of the "ModuleLayout" field).
     *
     * @var    string
     * @since  3.9.26
     */
    protected $regex = '^([A-Za-z0-9_-]+:)?[A-Za-z0-9-][A-Za-z0-9\.-]*$';
}

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.