public function getCaptionFieldLabel(RecordInterface $record, $fieldName)
    {
        if ($record) {
            /** @var \appbox $appbox */
            $appbox = $this->app['phraseanet.appbox'];
            $databox = $appbox->get_databox($record->getDataboxId());
            foreach ($databox->get_meta_structure() as $meta) {
                /** @var \databox_field $meta */
                if ($meta->get_name() === $fieldName) {
                    return $meta->get_label($this->app['locale']);
                }
            }
        }

        return '';
    }
public function getCaptionFieldLabel(RecordInterface $record, $fieldName)
    {
        if ($record) {
            /** @var \appbox $appbox */
            $appbox = $this->app['phraseanet.appbox'];
            $databox = $appbox->get_databox($record->getDataboxId());
            foreach ($databox->get_meta_structure() as $meta) {
                /** @var \databox_field $meta */
                if ($meta->get_name() === $fieldName) {
                    return $meta->get_label($this->app['locale']);
                }
            }
        }

        return '';
    }
public function getCaptionFieldLabel ( RecordInterface $ record , $ fieldName ) { if ( $ record ) { /** @var \appbox $appbox */ $ appbox = $ this -> app [ 'phraseanet.appbox' ] ; $ databox = $ appbox -> get_databox ( $ record -> getDataboxId ( ) ) ; foreach ( $ databox -> get_meta_structure ( ) as $ meta ) { /** @var \databox_field $meta */ if ( $ meta -> get_name ( ) === $ fieldName ) { return $ meta -> get_label ( $ this -> app [ 'locale' ] ) ; } } } return '' ; }
get localized field's label
@param RecordInterface $record
@param $fieldName
@return string - the name label
get localized field s label