예제 #1
0
파일: Combo.php 프로젝트: cawaphp/bootstrap
 /**
  * {@inheritdoc}
  */
 public function layout() : Container
 {
     if ($this->isRequired() == false) {
         $this->widgetOptions->addData('plugin', ['allowClear' => true]);
     }
     $container = parent::layout();
     if ($this->widgetOptions->count()) {
         $instance = $this->getFieldContainer($container);
         $instance->add($this->widgetOptions);
     }
     return $container;
 }
예제 #2
0
파일: Rating.php 프로젝트: cawaphp/widget
 /**
  * @param string $query
  *
  * @return $this|self
  */
 public function setQuery(string $query) : self
 {
     $this->widgetOptions->addData('query', $query);
     return $this;
 }
예제 #3
0
파일: Map.php 프로젝트: cawaphp/widget
 /**
  * @param AbstractShape $shape
  *
  * @return $this|self
  */
 public function addShape(AbstractShape $shape)
 {
     $this->widgetOptions->addData('shapes', [$shape]);
     return $this;
 }
예제 #4
0
파일: Carousel.php 프로젝트: cawaphp/widget
 /**
  * Vertical slide mode
  *
  * @param bool $vertical
  *
  * @return $this|self
  */
 public function setVertical(bool $vertical = true) : self
 {
     $this->widgetOptions->addData('vertical', $vertical);
     return $this;
 }