CoreFiles by mySites.guru
ModuleLayoutRule.php36 lines, 1,071 bytes, from Joomla_4.2.0-Stable-Full_Package.zip
Raw History Compare with 4.1.5
md5
3ce74e92a49e84e07795a4921933d1fb
sha1
e9b52a721725f65cf732334d40f5cfbd5b3f79ef
sha256
e230723c353f650cdc55cf4da53e08eef09155c7b116ba3660e21dd11bd9c3f9
<?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;

/**
 * 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 5 releases, Joomla 4.2.0-beta3 to 4.2.1-rc2. See them all, or every version of this file.