public function renderLabel($customFieldOrClass, $slug = null, array $params = array())
    {
        $resolvedParams = array_merge($this->defaultParams, $params);
        
        $customField = ($customFieldOrClass instanceof CustomField) 
            ? $customFieldOrClass : $this->container->get('chill.custom_field.provider')
                ->getCustomField($customFieldOrClass, $slug);
        
        return $this->container->get('templating')
            ->render($resolvedParams['label_layout'], array('customField' => $customField));
    }
public function renderLabel($customFieldOrClass, $slug = null, array $params = array())
    {
        $resolvedParams = array_merge($this->defaultParams, $params);
        
        $customField = ($customFieldOrClass instanceof CustomField) 
            ? $customFieldOrClass : $this->container->get('chill.custom_field.provider')
                ->getCustomField($customFieldOrClass, $slug);
        
        return $this->container->get('templating')
            ->render($resolvedParams['label_layout'], array('customField' => $customField));
    }
public function renderLabel ( $ customFieldOrClass , $ slug = null , array $ params = array ( ) ) { $ resolvedParams = array_merge ( $ this -> defaultParams , $ params ) ; $ customField = ( $ customFieldOrClass instanceof CustomField ) ? $ customFieldOrClass : $ this -> container -> get ( 'chill.custom_field.provider' ) -> getCustomField ( $ customFieldOrClass , $ slug ) ; return $ this -> container -> get ( 'templating' ) -> render ( $ resolvedParams [ 'label_layout' ] , array ( 'customField' => $ customField ) ) ; }
Twig Extension that is used to render the label of a custom field.

@param CustomField|object|string $customFieldOrClass Either a customField OR a customizable_entity OR the FQDN of the entity
@param string $slug The slug ONLY necessary if the first argument is NOT a CustomField instance
@param array $params The parameters for rendering. Currently, 'label_layout' allow to choose a different label. Default is 'ChillCustomFieldsBundle:CustomField:render_label.html.twig'
@return string HTML representation of the custom field label.
Twig Extension that is used to render the label of a custom field .