eZ\Publish\Core\REST\Client\Values\ContentType\ContentType::getName PHP Method

getName() public method

This method returns the name of the content type in the given language.
public getName ( string $languageCode ) : string
$languageCode string
return string the name for the given language or null if none exists.
    public function getName($languageCode)
    {
        return $this->names[$languageCode];
    }

Usage Example

 public function testGetName()
 {
     $contentType = new ContentType($this->contentTypeServiceMock, array('names' => array('eng-US' => 'Sindelfingen', 'eng-GB' => 'Bielefeld')));
     $this->assertEquals('Sindelfingen', $contentType->getName('eng-US'));
     $this->assertEquals('Bielefeld', $contentType->getName('eng-GB'));
 }