예제 #1
0
 /**
  * Generate an opening label tag
  * @param  null|array|ElementInterface $attributesOrElement
  * @return string
  */
 public function openTag($attributesOrElement = null)
 {
     $labelAttributes = array();
     if ($attributesOrElement instanceof LabelOptionsAwareInterface) {
         $labelAttributes = $attributesOrElement->getLabelAttributes();
     }
     $labelAttributes['class'] = 'btn' . (empty($labelAttributes['class']) ? '' : ' ' . $labelAttributes['class']);
     return parent::openTag($labelAttributes);
 }