Ejemplo n.º 1
0
 /**
  * Initialises the object
  *
  * @throws \yii\base\InvalidConfigException If `southwest` and/or `northeast` is not set
  */
 public function init()
 {
     parent::init();
     if ($empty($this->getLatLngs()) && (empty($this->_southwest) || empty($this->_northeast))) {
         throw new InvalidConfigException('Either the `latLngs` attribute or the `southwest` and `northeast` attributes must be set.');
     }
 }
Ejemplo n.º 2
0
 /**
  * Initialises the object
  *
  * @throws \yii\base\InvalidConfigException If `x` and/or `y` is not set
  */
 public function init()
 {
     parent::init();
     if (empty($this->x) || empty($this->y)) {
         throw new InvalidConfigException('The `x` and `y` attributes must be set.');
     }
 }
Ejemplo n.º 3
0
 /**
  * Initialises the object
  *
  * @throws \yii\base\InvalidConfigException If the `iconUrl` option is not set
  */
 public function init()
 {
     parent::init();
     if (!isset($this->options['iconUrl'])) {
         throw new InvalidConfigException('The `iconUrl` option must be set.');
     }
 }
Ejemplo n.º 4
0
 /**
  * Initialises the object
  *
  * @throws \yii\base\InvalidConfigException If `lat` and/or `lng` is not set
  */
 public function init()
 {
     parent::init();
     if (empty($this->_lat) || empty($this->_lng)) {
         throw new InvalidConfigException('The `lat` and `lng` attributes must be set.');
     }
 }