/**
  * Initialises the object
  *
  * @throws \yii\base\InvalidConfigException If the `bounds` attribute is not set
  */
 public function init()
 {
     if (empty($this->getBounds())) {
         throw new InvalidConfigException('The `bounds` attribute must be set.');
     }
     parent::init();
 }
 /**
  * Initialises the object
  *
  * @throws \yii\base\InvalidConfigException If the `url` attribute is not set
  */
 public function init()
 {
     parent::init();
     if (empty($this->_url)) {
         throw new InvalidConfigException('The `url` attribute must be set.');
     }
 }
Exemple #3
0
 /**
  * Initialises the object
  *
  * @throws \yii\base\InvalidConfigException If the `position` attribute is not set
  */
 public function init()
 {
     parent::init();
     if (empty($this->getLatLng())) {
         throw new InvalidConfigException('The `latLng` attribute must be set.');
     }
 }
 /**
  * Initialises the object
  *
  * @throws \yii\base\InvalidConfigException If the `position` attribute is not set
  */
 public function init()
 {
     parent::init();
     if (empty($this->getBounds()) || empty($this->_url)) {
         throw new InvalidConfigException('The `bounds` and `url` attributes must be set.');
     }
 }
Exemple #5
0
 /**
  * Finalises the JavaScript code and creates a JsExpression object.
  * This method adds any required Popup code before calling the parent implementation.
  *
  * @param string $js Object initialisation JavaScript
  * @return JsExpression Object JavaScript code
  */
 protected function toJsExpression($js)
 {
     return parent::toJsExpression($js . $this->popup());
 }