Exemple #1
0
 /**
  * 获取所有属性
  * @return array
  */
 public function getAttributes()
 {
     if (!array_key_exists('placeholder', $this->attributes)) {
         $this->attr('placeholder', $this->description());
     }
     return HtmlUtility::mergeAttributes($this->getConfiguredAttributes(), $this->getMetaAttributes(), $this->attributes);
 }
Exemple #2
0
 public static function renderStyles($styles = [])
 {
     return join("\n", array_map(function ($style) {
         return HtmlUtility::html()->style($style);
     }, $styles));
 }
Exemple #3
0
 protected function renderDisabled() : string
 {
     return HtmlUtility::form()->input('text', $this->elementName(), $this->value()->original(), ['disabled' => 'disabled']);
 }