getId() public method

Returns the ID of the field.
public getId ( ) : string
return string The ID of a field is equal to its name, where all sequences of squared brackets are replaced by a single underscore (e.g. if the name is "parent_name[field_key]", the ID is "parent_name_field_key").
Beispiel #1
0
 public function renderLabel(FieldInterface $field, $label = null, array $attributes = array())
 {
     if (null === $this->templates) {
         $this->templates = $this->resolveResources($this->resources);
     }
     return $this->templates['label']->getBlock('label', array('id' => $field->getId(), 'key' => $field->getKey(), 'label' => null !== $label ? $label : ucfirst(strtolower(str_replace('_', ' ', $field->getKey()))), 'attributes' => $attributes));
 }