Item/ContentfulContentType.php
public function updateEntryName(ContentfulEntry $entry)
    {
        $displayField = $this->getDisplayField();
        $values       = array_values((array)$entry->{$displayField});
        $entry->setName(isset($values[0]) ? $values[0] : 'Untitled');
    }
public function updateEntryName(ContentfulEntry $entry)
    {
        $displayField = $this->getDisplayField();
        $values       = array_values((array)$entry->{$displayField});
        $entry->setName(isset($values[0]) ? $values[0] : 'Untitled');
    }
public function updateEntryName ( ContentfulEntry $ entry ) { $ displayField = $ this -> getDisplayField ( ) ; $ values = array_values ( ( array ) $ entry -> { $ displayField } ) ; $ entry -> setName ( isset ( $ values [ 0 ] ) ? $ values [ 0 ] : 'Untitled' ) ; }
Updates the name according to the display field of the content type.

@param ContentfulEntry $entry
Updates the name according to the display field of the content type .