vendor/pimcore/pimcore/models/DataObject/ClassDefinition/Data/Countrymultiselect.php line 21

Open in your IDE?
  1. <?php
  2. /**
  3.  * Pimcore
  4.  *
  5.  * This source file is available under two different licenses:
  6.  * - GNU General Public License version 3 (GPLv3)
  7.  * - Pimcore Commercial License (PCL)
  8.  * Full copyright and license information is available in
  9.  * LICENSE.md which is distributed with this source code.
  10.  *
  11.  *  @copyright  Copyright (c) Pimcore GmbH (http://www.pimcore.org)
  12.  *  @license    http://www.pimcore.org/license     GPLv3 and PCL
  13.  */
  14. namespace Pimcore\Model\DataObject\ClassDefinition\Data;
  15. use Pimcore\Model;
  16. use Pimcore\Model\DataObject\ClassDefinition\DynamicOptionsProvider\CountryOptionsProvider;
  17. class Countrymultiselect extends Model\DataObject\ClassDefinition\Data\Multiselect
  18. {
  19.     /**
  20.      * Static type of this element
  21.      *
  22.      * @internal
  23.      *
  24.      * @var string
  25.      */
  26.     public $fieldtype 'countrymultiselect';
  27.     /**
  28.      * Restrict selection to comma-separated list of countries.
  29.      *
  30.      * @internal
  31.      *
  32.      * @var string|null
  33.      */
  34.     public $restrictTo null;
  35.     /**
  36.      * @param array|string|null $restrictTo
  37.      */
  38.     public function setRestrictTo($restrictTo)
  39.     {
  40.         /**
  41.          * @extjs6
  42.          */
  43.         if (is_array($restrictTo)) {
  44.             $restrictTo implode(','$restrictTo);
  45.         }
  46.         $this->restrictTo $restrictTo;
  47.     }
  48.     /**
  49.      * @return string|null
  50.      */
  51.     public function getRestrictTo()
  52.     {
  53.         return $this->restrictTo;
  54.     }
  55.     /**
  56.      * @return string
  57.      */
  58.     public function getOptionsProviderClass()
  59.     {
  60.         return '@' CountryOptionsProvider::class;
  61.     }
  62. }