Example #1
0
 /**
  * Returns the elements's label attributes as a string
  *
  * @return string
  */
 public function getLabelAttributes()
 {
     $result = [];
     $label = $this->element->getLabel();
     foreach ($label->getAttributes() as $attribute => $value) {
         if (null === $value) {
             $result[] = $attribute;
             continue;
         }
         $result[] = "{$attribute}=\"{$value}\"";
     }
     return implode(' ', $result);
 }