uawdijnntqw1x1x1
IP : 216.73.216.107
Hostname : toronto-dev2
Kernel : Linux toronto-dev2 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
Disable Function : None :)
OS : Linux
PATH:
/
srv
/
users
/
craft4
/
apps
/
craft4-newsite-space
/
vendor
/
craftcms
/
cms
/
src
/
validators
/
SiteIdValidator.php
/
/
<?php /** * @link https://craftcms.com/ * @copyright Copyright (c) Pixel & Tonic, Inc. * @license https://craftcms.github.io/license/ */ namespace craft\validators; use Craft; use yii\validators\Validator; /** * Will validate that the given attribute is a valid site ID. * * @author Pixel & Tonic, Inc. <support@pixelandtonic.com> * @since 3.0.0 */ class SiteIdValidator extends Validator { /** * @var bool|null $allowDisabled Whether to allow disabled sites. * @since 3.7.32 */ public ?bool $allowDisabled = null; /** * @inheritdoc */ public function validateAttribute($model, $attribute): void { $siteId = $model->$attribute; if ($siteId && !in_array($siteId, Craft::$app->getSites()->getAllSiteIds($this->allowDisabled), false)) { $message = Craft::t('app', 'Your system isn’t set up to save content for the site “{site}”.', ['site' => $siteId]); $this->addError($model, $attribute, $message); } } }
/srv/users/craft4/apps/craft4-newsite-space/vendor/craftcms/cms/src/validators/SiteIdValidator.php