src/CoreBundle/EventListener/DcGeneral/DefinitionBuilder/PropertyDefinitionBuilder.php
private function setLabel(PropertyInterface $property, $propInfo, IAttribute $attribute)
    {
        if ($property->getLabel()) {
            return;
        }
        if (!isset($propInfo['label'])) {
            $property->setLabel($attribute->getName());
            return;
        }
        $lang = $propInfo['label'];
        if (is_array($lang)) {
            $property->setLabel(reset($lang));
            $property->setDescription(next($lang));
            return;
        }
        $property->setLabel($lang);
    }
private function setLabel(PropertyInterface $property, $propInfo, IAttribute $attribute)
    {
        if ($property->getLabel()) {
            return;
        }
        if (!isset($propInfo['label'])) {
            $property->setLabel($attribute->getName());
            return;
        }
        $lang = $propInfo['label'];
        if (is_array($lang)) {
            $property->setLabel(reset($lang));
            $property->setDescription(next($lang));
            return;
        }
        $property->setLabel($lang);
    }
Set the label in the property.

@param PropertyInterface $property  The property definition.
@param array             $propInfo  The property info array.
@param IAttribute        $attribute The attribute.

@return void