addField() публичный Метод

Add a field which should be combined with the other fields.
public addField ( FieldMetadata $field )
$field Sulu\Component\Rest\ListBuilder\Metadata\Doctrine\FieldMetadata
Пример #1
0
 /**
  * Extracts concatenation-type for property-node.
  *
  * @param \DOMXPath $xpath
  * @param \DOMElement $propertyNode
  *
  * @return ConcatenationTypeMetadata
  */
 protected function getConcatenationType(\DOMXPath $xpath, \DOMElement $propertyNode)
 {
     $type = new ConcatenationTypeMetadata(XmlUtil::getValueFromXPath('@orm:glue', $xpath, $propertyNode, ' '));
     foreach ($xpath->query('orm:field', $propertyNode) as $fieldNode) {
         if (null === ($field = $this->getField($xpath, $fieldNode))) {
             continue;
         }
         $type->addField($field);
     }
     return $type;
 }